Clean up legend