         '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

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

            for own k, v of config
                if validConfigProperties.indexOf(k) isnt -1
                    serverConfig[k] = v
        # emailer_config.json
        if Fs.existsSync(emailerConfigPath)
            serverConfig.emailerConfig = getConfigFromFile(emailerConfigPath)
