For debugging
Wrong indent
Fix up serialization of entities.