ai4 cleaned up, some debugging cout's removed