Attempt at improved PLL / FLL / holdover logic