move connection.rb to lib/qc