Fixing 20% of my memory leaks, but still need to find the rest. Thanks to @theromit for pushing me on this.