added ufo ai code, fixed slight bugs
fixed merge error