 	toJSON: () ->
 		id: @id
 		passphrase: @passphrase
-		members: x.toJSON() for x in @members
-
-User.fromJSON = (jsonExpression) -> new User(jsonExpression.id, jsonExpression.powerLevel, jsonExpression.auth)
-Group.fromJSON = (jsonExpression) -> new Group(jsonExpression.id, User.fromJSON userExp for userExp in jsonExpression.members, jsonExpression.passphrase)
-
-# Set up variables
-userRegistry.push User.fromJSON json for json in JSON.parse Modules.fs.readFileSync ResourceDir + "users.json"
-groupRegistry.push Group.fromJSON json for json in JSON.parse Modules.fs.readFileSync ResourceDir + "groups.json"
+		members: x.id for x in @members
 
 # Set up common functions
 getUserById = (id) ->

	for group in groupRegistry
		return group if group.id is id

containsUser = (id) -> (getUserById id)?
containsGroup = (id) -> (getGroupById id)?


eventHandlers = [
	{
		expectedType: "dm"
		expectedArgs: ["dest"]
		onMessage: (msg, source) ->

	}
]
setupHandlersForUser = (conn, id) ->


# Login procedure
WSServer.on 'request', (req) ->
