Updated API and $http methods.