Fix legend, remove unwanted functions