major refactoring: categorized classes