Event model code cleanup