A bunch of bugfixes
Gonum implementation working until TestReduce.