Imrove rules for removing redundant \n symbols