Simplify an expression