Added comparison counters, added a type for return codes (used only by main).