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.


No, just moved from 4 spaces to 2 spaces.