More work in the ai subsystem.