Refactor Entity