Refactoring and new class