v1.2 - Added viewWillClose and viewWillOpen eventlisteners