Simplify PrimitiveFunction creation