 
 import PureJsonSerializer
 
-extension Request {
+/**
+ *  This protocol defines a type of data received.
+ *  these variables are used to access underlying
+ *  values
+ */
+public protocol Node {
+    var isNull: Bool { get }
+    var bool: Bool { get }
+    var float: Float? { get }
+    var double: Double? { get }
+    var int: Int? { get }
+    var uint: UInt? { get }
+    var string: String? { get }
+    var array: [Node]? { get }
+    var object: [String : Node]? { get }
+}
+
+public extension Request {
+    
+    /**
+     *  The data received from the request in json body or url query
+     */
     public struct Data {
-        public protocol Node {
-            public var isNull: Bool { get }
-            public var boolValue: Bool? { get }
-            public var floatValue: Float? { get }
-            public var doubleValue: Double? { get }
-            public var intValue: Int? { get }
-            public var uintValue: UInt? { get }
-            public var stringValue: String? { get }
-            public var arrayValue: [Node]? { get }
-            public var objectValue: [String : Node]? { get }
-        }
+        
         
         // MARK: Initialization
         

    }
    
    public var array: [Node]? {
        return self.componentsSeparatedByString(",")
    }
    
    public var object: [String : Node]? {

        case .ArrayValue(let array):
            return array
                .flatMap { js in
                    return js.string
                }
                .joinWithSeparator(",")
        case .ObjectValue(_):
