Refactoring class