Ternary tree and event classes import