Big cleanup of the code for the datasetExplorer page