Eliminated a ton of memory leaks.