Add "wait_for_match" to "BaseScript" and update references