Add stringmetric lib.
Minor refactoring.
wrap all of stanford in a try-catch since they throw random exceptions.