Cleaned up dynamic memory management, explicit pointer zeroing from destroy()