Fix tests for configuration

* Refactor YamlLoader and Configuration