PER-102 port more hooks to stateless functions and remove old hook wrapper