Remove obsolete test code, clean up an unneeded variable.