Removes unnecessary code