Move "type" field of element nodes to the shared metatable