Fleshed out loading code for null entities

Reorganized loading code in other places.