Revert "Revert "Added inheritance structure""

This reverts commit 03d1945d999fdccc3d968cedc9e592f15fb200ea.