Added EventFactory and sub-events

I think they're probably still wrong though.