Eliminate superfluous blocks