raw code for settings functionality

I did a quick working code so you guys (or Gunnar) can muck about with the settings