Large refactor: Use TypedExpr data type