Added new functions to corpusdocs, and added XML loading of corpus docs -> words.