Remove unecessary code and variable declarations.