Switched mostly to using either shared_ptr, or direct passing of classes during parsing, to avoid any memory ownership confusion.