Fix a Readme typo
Refactoring for better testing

This needs a lot of refactoring for unit tests and better use for
multiple config types.