Refactored/fixed the way inheritance happens.
added another type attr check test