Implemented dijkstra algo for the train graph. Refactoring, added comments.
Fixed complex path.