Refactors to better follow lifecycle.