fix settings always using defaults
minor structure changes