view lifecycle refactors