Introduced generic generation of unary expressions in order to reduce code duplication