changed factories file to services, combined multiple api calls in one service, cleaned up old markup