Big refactor in Entity class, protected attributes