Added code for performance evaluation.
More changes in performance evaluation code
Fixed the tests.