     result.total = total
     result.changes = changes
     result.extraLoop = extraLoop
-
-    result.scope = null
-    result.src = ''
-    result.element = null
     return
 
 

    return


scanCore = (topCD, result) ->
    root = topCD.root
    extraLoop = false

    if alight.debug.scan
        start = get_time()

    result =
        total: 0
        changes: 0
        extraLoop: false
        src: ''
        scope: null
        element: null

    while mainLoop
        mainLoop--
        root.extraLoop = false

        # take onScanOnce
        if root.watchers.onScanOnce.length
            onScanOnce = root.watchers.onScanOnce.slice()
            root.watchers.onScanOnce.length = 0
            for callback in onScanOnce
                callback.call root

        scanCore @, result
        totalChanges += result.changes

        if not result.extraLoop and not root.extraLoop
            break
    if alight.debug.scan
        duration = get_time() - start
        console.log "$scan: loops: (#{10-mainLoop}), last-loop changes: #{result.changes}, watches: #{result.total} / #{duration}ms"
    result.mainLoop = mainLoop
    result.totalChanges = totalChanges
    result
