further restructuring of modules to support the separate hist_data.py