Added Comperator to WeightedState.