Add event class and tests