First attempt at MapReducer rewrite. Testing