refactor deserialize_records()
make deserialize_content() faster (but maybe more fragile)