Refactors api modules to enable use of app configs