Added an ajax method to the query pages to get the new samples when a new dataset is selected. I also added some controller tests.