HUGE deviation in Sharp IR sensor values if other pins are defined in void setup()
Not sure why commenting out those two lines makes a difference.  I think we need to see a schematic to resolve this.

However...

You do not use "pinMode" to setup an analog input!

Look at the examples on the "analogRead" page.  Notice there is no setup needed for the analog pin.  Just call "analogRead" like you are doing and everything should be fine.