Print the proper entryorguid instead of always defaulting to @ENTRY/@GUID when updating the *_template table's AIName. Fixes issue with AIName being set of actionlists, for example
Re-implement linking, fixes a lot of cases where the link would not be found