Cleaning up generation of links and locator names