Switching from building 'edit' link in the script to building it in the template...