Removes unnecessary code.