remove unwanted code blocks