 
 ## 
-
-jsdom = require 'jsdom'
-
-Url = require 'url'
-
-files = floyd.tools.files
 
 module.exports = 
 

                    fn null, content
                    
                else
                    
                    ##
                    #start = +new Date()
                    @_createWindow req, content, (err, window)=>
                        #console.log 'create:', (+new Date()) - start
                        
                        return fn(err) if err
                        
                        ##
                        model = floyd.tools.objects.serialize model, (if @data.find('debug') then 4 else 0)
                        
                        ##
                        window.addEventListener 'unload', next = ()=>					
                            #console.log 'run:', (+new Date()) - start
                            
                            window.removeEventListener 'unload', next
                            
                            ## send the response
                            _dt = window.document._doctype?._fullDT || '<!DOCTYPE html>'
                            fn null, _dt+window.document.innerHTML
                            
                            ## cleanup async!
                            process.nextTick ()=>
                                
                                ## release the jsdom-window into the pool
                                @_releaseWindow window	

                        ##
                        window.addEventListener 'error', onerr = (e)=> 
                            window.removeEventListener 'unload', onerr
                            
                            fn e.data
                            
                            process.nextTick ()=>
                                @_releaseWindow window  
                            
                            
                        ## fire!
                        window.run "(#{__boot__})(#{model})"
            

        
        

                        
                        floyd.tools.http.files.resolve url, _public, (err, file)=>
                            return fn(err) if err
                            
                            files = floyd.tools.files
                            
                            if files.fs.lstatSync(file).isDirectory()
                                file = files.path.join file, @data.find 'index'
