Created trim-document.js

Updated dep slides.html to include the new file, moved code out of
scrubbing as a part of effort to modularize scrubbing