Refactor rest methods

This makes it more flexible to override parts for rest methods.
Also they are more unified now