Adding some code for handling settings, ADC, etc.