Delete handling Loaded and Closing event