Remove uncessary code and mistaken requires