Partial refactor: inheritance via ClassifierType instead of ClassDeclaration. (still some errors left)