STABLE: implement distributeNewDischargeSpaceBitSize and other refact