Begin to abstract settings

Also normalize some line endings.