Fix some indentations

Reduce logging for generating histograms/datasets,
log only one per summary and type instead of each histogram/dataset.
Reorder some functions.