Move hooks into hooks class

This will allow adding protected helper methods, which I will in my
next commit.

Change-Id: I63336e3d02ab2da6004184a0b51a6e5af7a2821d