changed event handling somewhat
event cleanup