Inheritance tutorial refactor