tags nested documents, added confidence as property, fixed tests