Changed mostly syntatic issues with adc module

Added appropriate static modifiers, changed how the end of the linked list was handled for efficiency, and fixed small bug with setting the appropriate period for the adc sequence.