Refactoring DataStructure to Entity