various degenerate handling
randval_i binding
discontinuity binding
minor changes