Fixed some bugs in shortest path, removed a private method that already
existed.