More work on entity serialization