 					else
 						throw "Unexpected object body type '#{body.type}'"
 
+		if not elem.parent and elem.name is 'Class' and not json.target
+			json.target = "`view`"
+
 		# unless MODIFIERS_NAMES[elem.name]
 		itemsKeys.push json.id
 		visibleId = json.id

	if anchor[0] is 'this'
		anchor.shift()
		anchor[0] = "this.#{anchor[0]}"

	anchor[0] = switch anchor[0]
		when 'this.parent', 'parent'

		code += "_c.idsOrder = #{JSON.stringify(idsKeys)}\n"
		code += "_c.objectsOrder = #{JSON.stringify(idsKeys).replace(/\"/g, '')}\n"
		code += "_c.objects = #{JSON.stringify(objects).replace(/\"`|`\"/g, '')}\n"

		if elem.name is 'Class'
			code += "_c.item.enable();\n"
			autoInitCodes.push code
		else
			code += 'return _c.createItem\n'
			uid = 'n' + utils.uid()
			id ||= uid
			if codes[id]?
				id = uid
			codes[id] = code
			firstId ?= id

		# queries
		for query, val of queries
