Refactor Contoller logic into Service
Handle bad requests for config files