Partial conversion to event callbacks