         'emailerConfig'
     ]
 
-    serverConfig     = {}
-    serverConfig.admins = []
-    serverConfigPath = null
-    projectRoot      = null
     Opts             = null
     dbName           = 'cloudbrowser'
+    projectRoot      = null
+    serverConfig     = {admins : []}
     mongoInterface   = null
-
-    # TODO : Refactor this function into some common file as it is used by
-    # application_manager too
-    
-    # Parsing the json file into opts
-    getConfigFromFile = (path) ->
-        try
-            fileContent = Fs.readFileSync(path, {encoding:"utf8"})
-            content = JSON.parse(fileContent)
-        catch e
-            console.log "Parse error in file #{path}."
-            console.log "The file's content was:"
-            console.log fileContent
-            throw e
-        
-        return content
+    adminCollection  = 'admin_interface.users'
+    serverConfigPath = null
 
     exclude = (key, value) ->
         if excludedProperties.indexOf(key) isnt -1 then return undefined

            if validConfigProperties.indexOf(k) isnt -1
                serverConfig[k] = v

    startServer = () ->
        if serverConfig.deployment
            console.log "Server started in deployment mode"
        else
            paths = []
            
            # List of all the unmatched positional args (the path names)
            paths.push path for path in Opts._
            
            server = new Server(serverConfig, paths, projectRoot, mongoInterface)

        server.once 'ready', ->
            console.log 'Server started in local mode'

    configureUser = (callback) ->
        user = null

        Async.waterfall [
            (next) ->
                Read({prompt : "Email: "}, next)

                else
                    user = new User(email)
                    # Find if the user already exists in the admin interface collection
                    mongoInterface.findUser(user, adminCollection, next)
            (userRec, next) ->
                # Bypassing the waterfall
                if userRec then callback(null, user)
