Discriminative plot fully working, plus discriminative bugfixes.