restructure event related classes