Big change - math new schema; make comparator more generic