[#72] All memory leaks fixed