New Dijkstra implementation

Stopped using SitePoint Dijkstra implementation as there were bugs with
large data, which I couldn't fix.