 
 /// page handler: will print a input form with the solution list below
 func handler(data: [String:Any]) throws -> RequestHandler {
-  return {
-    request, response in
+  return { _, response in
     response.setHeader(.contentType, value: "text/html")
-    response.appendBody(string: homePage)
-    response.completed()
+    .appendBody(string: homePage).completed()
   }//end return
 }//end handler
 
 /// favicon
 func favicon(data: [String:Any]) throws -> RequestHandler {
-  return {
-    request, response in
+  return { _, response in
     response.completed()
   }//end return
 }//end handler
 
-let confData = [
-	"servers": [
-		[
-			"name":"localhost",
-			"port":port,
+let configuration = [ "servers": [[ "name":"localhost", "port":PORT,
 			"routes":[
 				["method":"get", "uri":"/", "handler":handler],
 				["method":"get", "uri":"/favicon.ico", "handler":favicon],
-        ["method":"get", "uri":"/editor", "handler":socketHandler]
-			]
-		]
-	]
-]
+        ["method":"get", "uri":"/\(API)", "handler":socketHandler]
+			]]]
+]//end configuration
 
 do {
 	// Launch the servers based on the configuration data.
-	try HTTPServer.launch(configurationData: confData)
+	try HTTPServer.launch(configurationData: configuration)
 } catch {
 	fatalError("\(error)") // fatal error launching one of the servers
 }


    WebSocketHandler(handlerProducer: { (request: HTTPRequest, protocols: [String]) -> WebSocketSessionHandler? in

      guard protocols.contains("editor") else {
        return nil
      }//end guard


  }//end return
}//end handler

// default home page
let homePage = "<html><head><title>Perfect Online Markdown Editor</title>\n" +
  "<meta http-equiv='Content-Type' content='text/html;charset=utf-8'>\n" +
  "<script language=javascript type='text/javascript'>\nvar input, output;\n" +
  "function init()\n { input=document.getElementById('textInput'); \noutput=document.getElementById('results');\n" +
  "sock=new WebSocket('ws://' + window.location.host + '/\(API)', '\(PROTOCOL)');\n" +
  "sock.onmessage=function(evt) { output.innerHTML = evt.data; } }\n" +
  "function send() { sock.send(input.value); } \n" +
  "window.addEventListener('load', init, false);\n" +
