Commit rest of refactoring.  Settings page is still broken.