Various changes.
Implemented type class WeightedGraph.