unify handling of expressions

Cleanup and unification