For the second one we have a workaround . Just press ALT and then click and drag the element . The newly duplicated element will have the code .
2. When you copy and paste an object, it doesn't lose it's code.
Edit > Paste Special > Paste All will paste the code from the copied element, as well as all its properties and transitions. You can also choose Paste Special > Paste Actions.