Add lifecycle events.