Moving all api calls to controllers and directives.