Refactoring entities and other