Index: /trunk/sources/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs	(revision 10576)
+++ /trunk/sources/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs	(revision 10577)
@@ -220,11 +220,11 @@
 
         if (items.Count > 0) {
-          DataObject data = new DataObject();
+          var data = new DataObject();
           if (items.Count == 1) data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items[0]);
           else data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items);
           if (ReadOnly) {
-            DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
+            DoDragDrop(data, DragDropEffects.Copy);
           } else {
-            DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
+            var result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
             if ((result & DragDropEffects.Move) == DragDropEffects.Move) {
               foreach (string item in items) Content.Remove(item);
@@ -235,13 +235,5 @@
     }
     protected virtual void variableListView_DragEnter(object sender, DragEventArgs e) {
-      validDragOperation = false;
-      if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is object)) {
-        validDragOperation = true;
-      } else if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
-        validDragOperation = true;
-        IEnumerable items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        foreach (object item in items)
-          validDragOperation = validDragOperation && (item is object);
-      }
+      validDragOperation = !Locked && !ReadOnly && e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) != null;
     }
     protected virtual void variableListView_DragOver(object sender, DragEventArgs e) {
@@ -257,33 +249,14 @@
     protected virtual void variableListView_DragDrop(object sender, DragEventArgs e) {
       if (e.Effect != DragDropEffects.None) {
-        if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
-          IEnumerable<object> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<object>();
-          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-            var cloner = new Cloner();
-            var clonedItems = new List<object>();
-            foreach (var item in items) {
-              var dc = item as IDeepCloneable;
-              clonedItems.Add(dc != null ? cloner.Clone(dc) : item);
-            }
-            items = clonedItems;
-          }
-          foreach (var item in items) {
-            string name = GenerateNewVariableName();
-            Content.Add(name, item);
-            var listViewItem = variableListView.FindItemWithText(name);
-            listViewItem.BeginEdit();
-          }
-        } else {
-          object item = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-            var cloner = new Cloner();
-            var dc = item as IDeepCloneable;
-            if (dc != null) item = cloner.Clone(dc);
-          }
-          string name = GenerateNewVariableName();
-          Content.Add(name, item);
-          var listViewItem = variableListView.FindItemWithText(name);
-          listViewItem.BeginEdit();
-        }
+        object item = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        if (e.Effect.HasFlag(DragDropEffects.Copy)) {
+          var cloner = new Cloner();
+          var dc = item as IDeepCloneable;
+          if (dc != null) item = cloner.Clone(dc);
+        }
+        string name = GenerateNewVariableName();
+        Content.Add(name, item);
+        var listViewItem = variableListView.FindItemWithText(name);
+        listViewItem.BeginEdit();
       }
     }
Index: /trunk/sources/HeuristicLab.Scripting/3.3/Script.cs
===================================================================
--- /trunk/sources/HeuristicLab.Scripting/3.3/Script.cs	(revision 10576)
+++ /trunk/sources/HeuristicLab.Scripting/3.3/Script.cs	(revision 10577)
@@ -45,5 +45,6 @@
     private const string ExecuteMethodName = "Execute";
     private const string CodeTemplate =
-@"// use 'vars' to access global variables in the variable store
+@"// use 'vars' to access variables in the script's variable store
+// vars has a Contains(string) method to check if a variable exists and implements IEnumerable
 
 using System;
@@ -59,5 +60,5 @@
   }
 
-  // further classes and methods
+  // implement further classes and methods
 
 }";
@@ -117,9 +118,13 @@
         compileErrors = new CompilerErrorCollection(original.compileErrors);
     }
-
-    public Script()
-      : base("Script", "A HeuristicLab script.") {
+    public Script() {
+      name = ItemName;
+      description = ItemDescription;
       code = CodeTemplate;
       variableStore = new VariableStore();
+    }
+    public Script(string code)
+      : this() {
+      this.code = code;
     }
 
