Finished merging (and hist code in general), although hists need refactoring and optimization