Removed zring, fixed memory leaks