Refactoring, foundation for categories