Reformatted binning functions to follow a consistent interface