Clean up Dijkstra and make use of it to generate board map