Use detected line ending
Do simpler things first
Move constants to top of file
Fix grammar