Improve code style in call_tick_events()
Cleanup events/callouts in DEBUG mode, so valgrind don't complain.