Adding some sanitization and comments on what's going on in this document.