Bugfix

Lots of changes, detailed in each pull request
Why is this associated with the CONFIG namespace?