use populate to embed links onto documents... and fix some issues with deleting old links