removing unnecessary code and comments