getAll now returns an empty object when there are no resources (continued from #671)

Copied the branch from @gregkare's account to the org so that I could continue working on it