remove old config classes

Remove old classes and complete refactoring.

Within this: fixes #1116.