Minor refactoring Entity class