Clean minimap code