Refactor onRendered, onCreated, onDestroyed declarations