Made compatible with arbitrary binning

no longer assumes 8x8 binning on the server side, use whatever you want