API Tests & Async Promises

* API has unit tests.

* `controllers.js` is a light controller now, all API calls logic was moved to `factories.js`.

* API calls from Angular app are now async via promises.


:+1: on the reformatting.