Refactors api modules to enable use of app configs
Restores long callback notation  in routes to preserve object scope