Do some refactoring on t-SNE.