Removes unecessary code