Add support for view init and view unload event