Added the corpus package back in for back-compatibility. Rewrote BuildIndex in scala - removed a lot, but it's still out of control.