Entities refactoring.