twitter.rb cleaned up and some code moved into a class