Removing unnecessary code