Network: refactor mergeMaps, add random.