Removes unnecessary lines