Added EventLogger and cleaned up a bit.