Added main and callbacks for oid, document, and arrays