Some work on qrmanager and a change to the qrlib