Improves how a topics name for the url is obtained.

Closes #2961