Removes the ugly t parameter from the tests.
Fixes memory leaks on the tester.

A small bit of optimization too.