Removing unnessecary code