Added IEvent interface

and some minor changes