Major clean up of code, all api calls from model instead of controller