Added hooks for several modes.