Clean up AI on exit