Fix a memory leak
Add a function to run a test suite