added destroy function and events, update event handler mechanics