clean up a bunch of leaks