Implemented map_reduce. Errors in locking/worker failures.