Refactoring. Considering new method of inheritance