Removed console.log statement in lineEnding function to clean up output.