Removes unneccessary code