Extracted binning methods and placed in separate scripts. Fixed bug in hist2c.