[#12] Fixing more memory leaks.