Refactored the expression support to follow the algebraic structures underneath.