Added unit tests for the Comparator class.
Added comments to classes.