tidying up
over 200x speed up for getWordCounts()
switched word count function over to optimized version, nothing broked