refactoring lifecycle handling.
.