Streamlining of qadapter code.