Fix link type attribute in removal_document

removal_document would not add type attribute to links that are to be
removed which means they would not actually be removed from the database