Initial entities refactoring.