fix missing imports and encode URI in visualizer links