Refactoring class structure.