Added new life cycle events and some other stuff