WIP refactoring for ADC scaling