Generating class structure