Clean up model classes and add event tracking