Fixed numerious toxic memory leaks