Memory leaks and usage reduction