Refactoring with superclass