C: fix broken outcome_prob(), and various tweaks