Refactor; Restore global settings on LostFocus

Pulled some things out into different files for loose coupling. Lots of refactoring.

Also, fixed an issue I was experiencing where EditorConfig was overwriting global settings w/o restoring them.