refactoring of events; support for handleEvent; removed support for visual events