Refactor extended resources, make more decoupled from RestQuery to make stuff easier to test using testing client.