 
             #page params
             page = parseInt(req.query.page, 10)
-            nbPerPage = parseInt(req.query.nbperpage, 10)   
+            nbPerPage = parseInt(req.query.nbperpage, 10)
 
             #skip & limit + deleted lines params
-            nbDeleted = if req.query.deleted? then parseInt(req.query.deleted, 10) else 0              
+            nbDeleted = if req.query.deleted? then parseInt(req.query.deleted, 10) else 0
             pageParams['limit'] = nbPerPage
-            if page > 1 
+            if page > 1
                 pageParams['skip'] = (nbPerPage * (page - 1)) - nbDeleted
 
             #query param
             if req.query.query? and req.query.query isnt ""
-                pageParams['query'] = req.query.query     
+                pageParams['query'] = req.query.query
 
 
             #prepare multiple page process
             # newKey = req.query.doctype.join('_')
-            # if not ds.pageCountMatrix[newKey]?
-            #     ds.pageCountMatrix[newKey] = []
+            # if not dataSystem.pageCountMatrix[newKey]?
+            #     dataSystem.pageCountMatrix[newKey] = []
 
 
             #----VERIFY DOCTYPE 'ALL' REQUESTS
             tabUnregistered = []
-            for dt in tabDoctypes                
-                if not ds.registeredPatterns[dt.toLowerCase()]?
+            for dt in tabDoctypes
+                if not dataSystem.registeredPatterns[dt.toLowerCase()]?
                     tabUnregistered.push dt.toLowerCase()
 
-            if tabUnregistered.length > 0 
+            if tabUnregistered.length > 0
 
                 #verify if doctype exist
                 requests = []
                 requests.push (callback) -> #0 -> doctypes
-                    ds.getDoctypes(callback)
+                    dataSystem.getDoctypes(callback)
                 async.parallel requests, (error, results) ->
                     if error
                         res.send {'no_result' : 'Error : Server error occurred while retrieving data.'}
                         console.log error
-                    else         
+                    else
 
-                        #compare submitted doctype and existing doctype for more security        
-                        bError = false                       
-                        tabRegisteredDoctypes = results[0]                        
+                        #compare submitted doctype and existing doctype for more security
+                        bError = false
+                        tabRegisteredDoctypes = results[0]
                         for dtUnreg in tabUnregistered
                             bUnknowDoctype = true
                             for dtReg, index in tabRegisteredDoctypes
                                 if not bError
                                     if dtUnreg.toLowerCase() is dtReg.toLowerCase()
-                                        bUnknowDoctype = false                                    
-                                    if bUnknowDoctype and index is tabRegisteredDoctypes.length-1                                    
+                                        bUnknowDoctype = false
+                                    if bUnknowDoctype and index is tabRegisteredDoctypes.length-1
                                         res.send {'no_result': 'Error : You try to access to an unknown doctype.'}
                                         bError = true
 
 
                         if not bError
                             #prepare request 'all' for each doctypes
-                            setupRequestsAll = ds.prepareDballRequests(tabUnregistered)                     
+                            setupRequestsAll = dataSystem.prepareDballRequests(tabUnregistered)
 
                             #agregate callbacks
                             if setupRequestsAll.length > 0

                                        console.log error
                                        res.send {'no_result' : 'Error : Server error occurred while retrieving data.'}
                                    else
                                        se.doBasicSearch(res, tabDoctypes, pageParams)
                            else
                                res.send {'no_result' : 'Error : Server error occurred while retrieving data.'}

            else 
                se.doBasicSearch(res, tabDoctypes, pageParams)

                    
        else
            res.send {'no_result' : 'Error : Unknown research parameters'}



#search
action 'search', ->
    if req.query?

        tabDoctypes = req.query.doctype || null

