attempted to cleanup javascript

doctools.js
unresolved variables
URL_ROOT
DOCUMENT_OPTIONS
unresolved JSON variable

preprocessing.py
str. ls (calling a method using an instance of a different class)
strip_punctuation2(s)

test_corpra.py
self.corpus_class(testfile()) is not callable because it is a trupal

dictionary.py
exception handling work -- except: too broad changed to if not then