Fixed linting errors in Main, changed wordfreq to a utility