Delete unnecessary blocks