Fixed variable declarations and namespacing of timers