Update script to parse new document structure.