updated lookahead logic and split out some of the calculations

moved functions out of map and into vehicle where appropriate