move HistMerger and FileHandle to separate files. These will become more flexible