refactor event classes to work with shared_ptr as preparation for async events