Start of entity refactoring