Refactor config class 825

Fixes #825