You don't need to redefine ADCON0 and ANSEL all the time, only once at the top, and ADCIN should handle everything for you.