Remove LinkedDocument class and calculate linked document from the content