Updating copy function to play nicely with Angular and other potential circular dependencies.