Coded integration of pathing and map.

Bug: It freezes when trying to path.