Changed resource object to return promises instead of actual results