Minor changes, removed thread printouts.
Fixed array sizing issues.
Various debug statements.