removes unnecessary code and comments