Added pathing algorithm, based on Djikstra.