     obj.prev().children('.operator, .operator-ok').removeClass(removeClass).addClass addClass
     return
 
-  formatTags = (tags) ->
-    tags = tags or []
-    for i of tags
-      tags[i] =
-        value: tags[i]
-        type: 'tag'
-    tags
-
-  tags = formatTags(element.data('tags'))
-  prepopulatedTags = formatTags(element.val().split(' '))
-  tags = tags.concat([
-    {
-      value: '('
-      type: 'operator'
-    }
-    {
-      value: ')'
-      type: 'operator'
-    }
-    {
-      value: '+'
-      type: 'operator'
-    }
-    {
-      value: '-'
-      type: 'operator'
-    }
-  ])
+  formatTags = (tags, type) ->
+    result = $.extend([], tags)
+    for i of result
+      result[i] =
+        value: result[i]
+        type: type
+    result
+
+  operator = ['(', ')', '+', '-']
+  noSpaceBefore = new RegExp(/([^ ])(\+|-|\(|\))/)
+  noSpaceAfter = new RegExp(/(\+|-|\(|\))([^ ])/)
+  tags = formatTags(element.data('tags'), 'tag')
+  prepopulatedTags = element.val()
+  .replace(noSpaceBefore, '$1 $2')
+  .replace(noSpaceAfter, '$1 $2')
+  .split(' ')
+  tags = tags.concat(formatTags(operator, 'operator'))
   element.tokenInput tags,
     allowFreeTagging: true
     onAdd: (item) ->

    onDelete: (item) ->
      testLuceneExpression $(this)
      return
    prePopulate: prepopulatedTags
    propertyToSearch: 'value'
    theme: 'facebook'
    tokenFormatter: (item) ->

    tokenDelimiter: ' '
    tokenValue: 'value'
    zindex: 100002
  for i of prepopulatedTags
    type = if operator.indexOf(prepopulatedTags[i]) != -1 then 'operator' else 'tag'
    element.tokenInput "add", 
      value: prepopulatedTags[i]
      type: type
  return
#NODE CHOICE ENABLED
activateOrchestraNodeChoice = (element) ->
