Further work on testing, trying to figure out strange memory bug.