Refactor comparisons