work around config file loading too late for settings ui getting correct default values and refactor some to clean up