misc refactorings, mostly style
num_bits param added for bimodal predictor