Split out comparison into a separate class

Create BasicComparator for current comparison. More comparison methods
possible in future.

Easier comparison testing as a bonus.