fixed some errors that arose from previous commits
updated guard file
moved comparator data to a method rather than a class variable
create type assertions on the fly to DRY this out