Refactored and fixed issues in Config API service. Full unit test coverage.