finish cleanup code for minimap