Attempt to cut down on the memory leaks