Pull out old re-binning code

Wasn't working reliably; functionality replaced with
change_bin()

Also, cleaned up the code a bit.
Merge branch 'bug/remove_old_changebins'