Wrong generation value assignment was fixed.
Methods for shortest path find added.