Refactor base class