Refactor into superclass