remove trailing spaces
separate hist_ix array

not so mem-wasty anymore