removing unwanted code snippets