Function splitIntoLines