Replaced local initialLED var with global Prog_InitialLED to properly track LED status in programming mode and fix LED flicker bug.
Also cleaned up globals.h