More cleanup for mapreduce