Move activity to controller package. Add lifecycle event handlers.