Merged develop branch into master

this should have the legend and a destroy function