More referens improvements and other stuff

Batch pull request for:
 * Fix for problems with delete repo
 * Adds base for direct content/SiteNode link function
 * Fixes a problem with digital asset copy between versions