Added API layer. Moved to js-routes rather than hard-coded angular constants