fixed critical bug with copying content

The bug was that items were no longer draggable. 

Also ran JSHint to clean up and fix minor issues in the JS files.