Convert more commands to use hooks.