Add Before / After hooks.