Fixed getWallAt returning a reference.
Added entity types and initialization of unique entity IDs.