Updated to support entity hierarchy + spawning.