Refactoring Entities and DAO