 
 /// 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
 }

      // convert the input from markdown to HTML
      let output = input.markdownToHTML ?? ""

      socket.sendStringMessage(string: output, final: true) {
        self.handleSession(request: request, socket: socket)
      }//end send

import PerfectMarkdown

/// server port to start with
let PORT = 7777

/// web socket protocol
let PROTOCOL = "editor"

/// web socket api entry
let API = "editor"

/// WebSocket Event Handler
public class EditorHandler: WebSocketSessionHandler {

  public let socketProtocol : String? = PROTOCOL

  // This function is called by the WebSocketHandler once the connection has been established.
  public func handleSession(request: HTTPRequest, socket: WebSocket) {
