Eliminated all memory leaks