Added option to show/hide the legend. Renamed 'samples' folder to 'demo'.