Implemented the legend correctly. Improved colors.