Refactored Privateer::Connection to eliminate duplication.