separate a generic api from the core app; generic api still needs cleanup like removing angular $scope dependencies