Starting to clear some memory leaks.