Refactor Entity class: dependencies