Hi Len,

ADCON1.5 = 1 will set AN2 as VREF- input and ADCON1.4 = 1 will set AN3 as VREF+ input. Also, bits 6 and 7 of ADCON1 are unimplemented so setting them to either one or zero will not matter.
To set complete PORTB to digital IO, set ADCON1 to 00001111b (0Fh).
Please refer datasheet page 224 for more details.
Also you can set CMCON register to 00000111b to turn off the comparator module if you are not using it.