refactor Settings code

I also want to get rid of those two clones: config preference file /
settings preference file. Hopefully I'll do it someday...