Rewrite to support resource nesting. Note that param arguments are no longer supported. Params are now placed in this.params.