Updated to ngResource