Bug 994690 - Refactor config loader to use promises and add unit tests to it