Refactoring processing, timers, and logging