Some cleanup for processing this doc.