Refactoring classes