One correction to the code, the hall sensor is on RB0 not in PortB.0.

RB0 is pulled high and the hall sensor pulls it low when the magnet passes (would like to still change this around but assume it wont make a difference except to power consumption).