Removed memory leaks from test.