cleanup and simplify relational operators