Dijkstra implemented,
Parent Class added and refactored