Minor refactor, prepare for event callback