Rewrite word splitter

Also return an index of the word in the original string.