Improved dataset_query and add_dataset_tag
Code style fixes