Move hook-like functions to Hooks class.