add a link.  do some cleanup