Implemented a much more accurate word-breaking algorithm