Some changes form manteniablele code + str_wordcount