Refactor arithmetic/relational expression generation
Refactor equality expression generation into standalone function