Implemented entity management logic.