tidy up of comparators, some implementations were changed to match standard practice and copyright notice updated