Some cleanup in AI.