Reworked Configuration class for easier testing

Then made more tests :-)