created separate hist_data module, misc fixes