Refactoring the mapreduce lab