Changed rest hooks to be abstract hooks that any module can use.