Got rid of silly uses of apply and flatten
Another silly flatten that could be a mapcat
Merge remote-tracking branch 'upstream/master'