Rework of entity loading (partially complete)