Word freq should always be digit

Word freq should always be digit. What's more, some comments are added