Added better end of line recognition to parser