Cleaned up connection.rb