AI import refactor