CR of Bradly's changes to for_loops and scope