removing unnecessary code and debugging information