Entities refactoring