     loophole ?= require 'loophole'
     allowUnsafeEval ?= loophole.allowUnsafeEval
     allowUnsafeNewFunction ?= loophole.allowUnsafeNewFunction
+    Emitter ?= require('atom').Emitter
+
+    # Initialize fields
+    @emitter = new Emitter
 
     # Initialize templates of Hogan.js
     TranslatorPlusDictionaryView.initializeTemplates(

loophole = null
allowUnsafeEval = null
allowUnsafeNewFunction = null

module.exports =
class TranslatorPlusDictionaryView

          @toLanguage.selectedIndex = i
    )

  onClosed: (callback) -> @emitter.on("Closed", callback)

  destroy: ->
    @emitter.dispose()
    @decoration?.destroy()
    @marker?.destroy()
    @element?.remove()
