Refactored words_wordsToFrequencies() and updated its documentation
Fixed a bug in words_wordsToFrequencies()