clean up AMD loading code