Moved zeroCross handling into interrupt.

Also moved dimming handling out of interrupts