Added user-configurable hooks