Entity class refactoring