Refactoring to make more generic entities
Small refactorings