Fix ContextComparer class. Add test.
Add sorting of error output.