Removing unecessary code