more steps towards a streamlined mapReduce

not sure if it will actually be faster but at least it’s already 1300
lines shorter