Added some debug code to print arrays.