Refactor tweeting, add recording of new stats to file. Needs to be tested more thoroughly