Updated test driver to be completely leak-free