CONNECT-290 Move common code out to a new library