Moved the adapter loading code.