New configuration framework

New configuration framework, which simplifies code a lot. Should be fully compatible with the old one.
Well it's just a private, locally used variable. If you think changing it's name has any disadventages though, I can change it back.