Refactor binary expressions