Add newProto utility function.