Refactor handleTweets and add refresh functions