So if I want to use an analog input for port A I need to include a line of code such as this:

ANSEL = %00001111

if I want PORTA.0-PORTA.3 to be analog inputs, but if I'm getting serial data in through these pins can I keep them as digital input/output ports and just use the first digital high that comes in from the serial information to activate some output on another pin? Also I found a project that used the code 'ADCON1.7 = 1' to align bit 7 to be right justified and then 'ADCON1.4 = 0' and 'ADCON1.5 = 0' to default to using Vref. When I'm not doing any analog to digital conversion I shouldn't need any of these commands should I?