Updated BagOfWords with a few more options