added Event class, and a bunch of things