removed a few more unused variables

replaced [] with .length = 0; to reset arrays