Make AIs classes instead of functions.