configuration object cleanup

This change cleans up the main configuration object and also adds some new tests.