analogRead() code cleanup