- made LDDocument use shared pointers, this eliminates a lot of document-related crashes