Moved main out of TweetDaemon and added further unit tests