diff --git a/cypher/convertQuery.go b/cypher/convertQuery.go
index f20ebeb7cbb5c6d88b254005d24d23e3f332d43f..cd869cb02ed437dc45ad2a3deed65edf6b00fd98 100644
--- a/cypher/convertQuery.go
+++ b/cypher/convertQuery.go
@@ -179,6 +179,7 @@ func createQuery(JSONQuery *entity.IncomingQueryJSON) *string {
 		}
 	}
 
+	ret = TrimSuffix(ret, " ")
 	return &ret
 }
 
diff --git a/main/main.go b/main/main.go
index ba1e4b9f678b3556f359d52914814f9329fcb582..dfb886b2e6cd140bbd06d38f3f6ea4ddd9b7471c 100644
--- a/main/main.go
+++ b/main/main.go
@@ -33,85 +33,6 @@ func main() {
 		"limit": 5000
 	}`)
 
-	// js := []byte(`{
-	// 	"return": {
-	// 		"entities": [
-	// 			0,
-	// 			1,
-	// 			2
-	// 		],
-	// 		"relations": [
-	// 			0,
-	// 			1
-	// 		]
-	// 	},
-	// 	"entities": [
-	// 		{
-	// 			"type": "airports",
-	// 			"constraints": [
-	// 				{
-	// 					"attribute": "city",
-	// 					"value": "New York",
-	// 					"dataType": "string",
-	// 					"matchType": "exact"
-	// 				}
-	// 			]
-	// 		},
-	// 		{
-	// 			"type": "airports",
-	// 			"constraints": [
-	// 				{
-	// 					"attribute": "city",
-	// 					"value": "San Francisco",
-	// 					"dataType": "string",
-	// 					"matchType": "exact"
-	// 				}
-	// 			]
-	// 		},
-	// 		{
-	// 			"type": "airports",
-	// 			"constraints": [
-	// 				{
-	// 					"attribute": "state",
-	// 					"value": "HI",
-	// 					"dataType": "string",
-	// 					"matchType": "exact"
-	// 				}
-	// 			]
-	// 		}
-	// 	],
-	// 	"relations": [
-	// 		{
-	// 			"type": "flights",
-	// 			"depth": {
-	// 				"min": 1,
-	// 				"max": 3
-	// 			},
-	// 			"entityFrom": 2,
-	// 			"entityTo": 1,
-	// 			"constraints": [
-	// 				{
-	// 					"attribute": "Day",
-	// 					"value": "15",
-	// 					"dataType": "int",
-	// 					"matchType": "EQ"
-	// 				}
-	// 			]
-	// 		},
-	// 		{
-	// 			"type": "flights",
-	// 			"depth": {
-	// 				"min": 1,
-	// 				"max": 1
-	// 			},
-	// 			"entityFrom": 0,
-	// 			"entityTo": -1,
-	// 			"constraints": []
-	// 		}
-	// 	],
-	// 	"limit": 5000
-	// }`)
-
 	var inc entity.IncomingQueryJSON
 	json.Unmarshal(js, &inc)
 	result, _ := queryservice.ConvertQuery(&inc)