Refactored get-frequent-kmers as a method