Tidied ADC cal function (dead code, etc)