Putting tweeting code back in, ready for better testing.