incorporated Action into AI routine. Cleanup.