refinement: improved minimap code.