Improve AI structure