added resolve method to route config, refactored controllers