Handles loops and bug fixes for arrays and structs.  Some new testcases.