make new config system

We need to make the config system better, instead of doing it manually. Maybe use something like `confmodel`?
The config class should probably go above the class that uses it.