Fixed a couploe of memory leaks
Plugged more memory leaks