Remove AI routine for refactoring.