Add hierarchy class, its fields, and some methods