Fixed bug where creating a duplicate legend item overwrites the selected item;
Fixed bug where duplicate legend item is created above selected item instead of below
Fixed bugs in state saving that do state creation/duplication instead of overwrite
Removed trailing slash in State API URL