Refactoring and adding twitter term count