 
   constructor: (@attributes) ->
     super
+    @default = children: [] unless @default
     @children = []
-    @default = children: [] unless @default
     @constructor.type = "Molecule"
     do @scaffold
     do @output


  entity: (entities) ->
    do @_removeAtomsEntities

    for entity in entities when Atoms.Atom[@atomEntity]?
      attributes = entity: entity
      attributes = Atoms.Core.Helper.mix attributes, @default.children?[@atomEntity]
      @_entities.push @_atomInstance null, @atomEntity, attributes

  # Private Methods
  _atomInstance: (key, className, attributes) ->
    attributes.parent = @
    attributes.events = attributes.events or []
    new Atoms.Atom[className] attributes

  _removeAtomsEntities: ->
    entity.el.remove() for entity in @_entities

    children = @attributes.children or @default.children
    for atom, index in children
      for key of atom when key in @available
        item = key.split(".")
        type = item[0]
        class_name = item[1]
        if Atoms[type][class_name]?
          attributes = Atoms.Core.Helper.mix atom[key], @default.children?[index]?[key]
          instance = @_atomInstance class_name, attributes
          @children.push instance
          @[key] = [] unless @[key]?
          @[key].push instance
