Classification refactoring