changed the scheduler to push scheduled events using Dispatcher::Queue. Also separated schedule updating into its own function.