Applied jpab's suggestions.
Also fixed some line endings.