Memory Leak Fixes

Closed a bunch of result sets which caused memory leaks.