Refactoring: move entity methods inside the entity interface