Merged some parts of WordStat with LibHaskell