Re-added changes to AI scripts