add visualization layer via d3 for tsne, also fix some element() calls