Clean up. Added hooks.