Remco figure out settings

Do cleanup on the settings. I'm going to do more, but pull requests shouldn't get too big. Also fixed existing tests.