Make linked_document dynamic, and remove the LinkedDocument class