Chased down a bunch of memory leaks