code cleanup and changed layer (minimap)