More testing related stuff.
- Updated the tests to have more code coverage.
- Refactor many classes to reduce the CRAP index.
- Added tests for the BaseConfigAdapter.