Perfmon refactoring.
Begin working on tests.
Refactoring of the tests.