--- a/controllers/mysql.js
+++ b/controllers/mysql.js
@@ -54,97 +54,14 @@
 			}
 		}
 	})
-	/*
-	con.query(sqlQuery, function (err, result) {
-		if (err){ 
-			callback(false,err);
-		}
-		else{
-			if(result.length == 0 && body.appID != "null"){
-				var newToken = token.token_generator();
-				var sqlQuery = "INSERT INTO registration ( token, appID, developerID) VALUES ('"+newToken+"','"+body.appID+"','"+body.developerID+"')";
-			
-				con.query(sqlQuery, function (err, result) {
-					if (err){
-						callback(false,result);
-					}
-					else{
-						email.sendEmailToken(body.developerID, newToken);
-						callback(true,{token: newToken});
-					}
-				});
-				
-			}
-			else{
-				callback(false,"App is already registered or AppID is Null");
-			}
-		}
-	});*/
-}
-
-/*
-Insert vApp by DeveloperID
-*/
-module.exports.insertVappByDeveloperid= function(body, callback){
-	var sqlQuery = "SELECT appID FROM registration where appID = '"+body.appID+"'";
-	handlerDB(sqlQuery, function(err, result){
-		if (err){ 
-			callback(false,err);
-		}
-		else{
-			if(result.length == 0 && body.appID != "null"){
-				var newToken = token.token_generator();
-				var sqlQuery = "INSERT INTO registration ( token, appID, developerID) VALUES ('"+newToken+"','"+body.appID+"','"+body.developerID+"')";
-				
-				handlerDB(sqlQuery, function(err, result){
-					if(err){
-						callback(false, result);
-					}else{
-						email.sendEmailToken(body.developerID, newToken); 
-						callback(true, {token: newToken})
-					}
-				})
-			}
-			else{
-				callback(false,"App is already registered or AppID is Null");
-			}
-		}
-	})
-	/*
-	con.query(sqlQuery, function (err, result) {
-		if (err){ 
-			callback(false,err);
-		}
-		else{
-			if(result.length == 0 && body.appID != "null"){
-				var newToken = token.token_generator();
-				var sqlQuery = "INSERT INTO registration ( token, appID, developerID) VALUES ('"+newToken+"','"+body.appID+"','"+body.developerID+"')";
-				
-
-				con.query(sqlQuery, function (err, result) {
-					if (err){ 
-						callback(false,result);
-					}else{
-						email.sendEmailToken(body.developerID, newToken); 
-						callback(true,{token: newToken});
-					}
-				});
-			}
-			else{
-				callback(false,"App is already registered or AppID is Null");
-			}
-		}
-	});
-	*/
 }
 
 /*
 Insert Notifications
 */
 module.exports.insertNotification= function(data, callback){
-	date = new Date().toISOString().slice(0, 19).replace('T', ' ');
 	strSubject = data.subject + " = " + data.subjectValue;
-	var sqlQuery = "INSERT INTO notificationlist ( emailTo, subject, date, token, ntype) VALUES ('"+data.emailTo+"','"+strSubject+"', '"+date+"', '"+data.token+"', "+parseInt(data.ntype)+")";
+	var sqlQuery = "INSERT INTO notificationlist ( emailTo, subject, token, ntype) VALUES ('"+data.emailTo+"','"+strSubject+"', '"+data.token+"', "+parseInt(data.ntype)+")";
 	
 	handlerDB(sqlQuery, function(err, result){
 		if (err){
@@ -154,14 +71,6 @@
 			callback(true, result);
 		}
 	})
-	/*con.query(sqlQuery, function (err, result) {
-		if (err){
-			callback(false,err);
-		}
-		else{
-			callback(true, data);
-		}
-	});*/
 }
 
 /*
@@ -185,22 +94,6 @@
 			});
 		}
 	})
-	/*con.query(sql, function (err, res) {
-		if (err){
-			callback(false,err);
-		}
-		else{
-			var sqlQuery = "INSERT INTO ruleslist ( description, parameter, conditionValue, controlValue, notificationType, token) VALUES ('"+body.description+"','"+body.parameter+"','"+body.conditionValue+"','"+body.controlValue+"','"+body.notificationType+"','"+res[0].token+"')";
-			con.query(sqlQuery, function (err, result) {
-				if (err){ 
-					callback(false,err);
-				}
-				else {
-					callback(true);
-				}
-			});
-		}
-	});*/
 }
 
 /*
@@ -219,17 +112,6 @@
 			callback(true, subject);
 		}
 	})
-	/*con.query(sqlQuery, function (err, rows) {
-		if (err) {
-			logger.info("Update Values for Statistics: " + err);
-			callback(false,err);
-		}
-		else{
-			logger.info("Update Values for Statistics: Success");
-			callback(true, subject);
-		}
-	});
-	*/
 }
 
 /*
@@ -250,19 +132,6 @@
 			}
 		}
 	})
-	/*con.query(sqlQuery, function (err, result) {
-		if (err){
-			callback(false,err);
-		}
-		else {
-			if(result.length == 0){
-				callback(false,"DeveloperID incorrect");
-			}
-			else{
-				callback(true,result);
-			}
-		}
-	});*/
 }
 
 
@@ -298,42 +167,9 @@
 						callback(true,rows);
 					}
 				})
-				/*
-				con.query(sqlQuery, function (err, rows) {
-					if (err){ 
-						callback(false,err);
-					}
-					else {
-						callback(true,rows);
-					}
-				});
-				*/
-			}
-		}
-	})
-	/*
-	con.query(sql, function (err, res) {
-		if (err){
-			callback(false,err);
-		}
-		else{
-			if(res.length == 0){
-				callback(false,"AppID incorrect");
-			}
-			else{
-				var sqlQuery = "SELECT emailTo, subject, date, token FROM notificationlist where token = '"+res[0].token+"'";
-				con.query(sqlQuery, function (err, rows) {
-					if (err){ 
-						callback(false,err);
-					}
-					else {
-						callback(true,rows);
-					}
-				});
-			}
-		}
-	});
-	*/
+			}
+		}
+	})
 }
 
 /*
@@ -359,65 +195,13 @@
 						callback(true,rows);
 					}
 				})
-				/*
-				con.query(sqlQuery, function (err, rows) {
-					if (err){
-						callback(false,err);
-					}
-					else{
-						callback(true,rows);
-					}
-				});
-				*/
-			}
-		}
-	})
-	/*
-	con.query(sql, function (err, res) {
-		if (err){
-			callback(false,err);
-		}
-		else{
-			if(res.length == 0){
-				callback(false,"AppID incorrect");
-			}
-			else{
-				var sqlQuery = "SELECT * FROM ruleslist where token = '"+res[0].token+"'";
-				con.query(sqlQuery, function (err, rows) {
-					if (err){
-						callback(false,err);
-					}
-					else{
-						callback(true,rows);
-					}
-				});
-			}
-		}
-	});
-	*/
+			}
+		}
+	})
 }
 
 /*
 Retrieve Statistics
-*/
-
-/*
-module.exports.retrieveStatisticsList = function(ruleid, callback){
-	var totalNotifications = 0;
-	var totalNotificationsApplyByRules = 0;
-	var totalValue = 0;
-	var averageValue = null;
-	var percentage = null;
-
-	var sqlQuery = "SELECT * FROM statisticslist where rulesID = '"+ruleid+"'";
-	con.query(sqlQuery, function (err, rows) {
-		if (err) {
-			callback(false,err);
-		}else{
-			callback(true, rows);
-		}
-	});
-}
 */
 
 module.exports.retrieveStatisticsList = function(ruleid, callback){
@@ -458,38 +242,6 @@
 			callback(true, rows, {totalNotifications: totalNotifications, totalNotificationsApplyByRules: totalNotificationsApplyByRules, averageValue: averageValue, percentage: percentage});
 		}
 	})
-	/*
-	con.query(sqlQuery, function (err, rows) {
-		if (err) {
-			callback(false,err);
-		}
-		else{
-			totalNotifications = rows.length;
-			
-			if(totalNotifications == 0){
-				totalNotifications = 0;
-				totalValue = 0;
-				totalNotificationsApplyByRules = 0;
-				averageValue = 0.0;
-				percentage = 0.0;
-			}else{
-				for (var i = 0; i < totalNotifications; i++){
-					if(rows[i].result == "true"){
-						totalNotificationsApplyByRules++;
-						totalValue = parseFloat(totalValue + parseFloat(rows[i].subjectValue));
-					}
-					else{
-						totalValue = parseFloat(totalValue + parseFloat(rows[i].subjectValue));
-					}
-				}
-				averageValue = (totalValue / totalNotifications).toFixed(2);
-				percentage = ((parseInt(totalNotificationsApplyByRules) * 100 ) /  parseInt(totalNotifications)).toFixed(2);
-			}
-
-			callback(true, rows, {totalNotifications: totalNotifications, totalNotificationsApplyByRules: totalNotificationsApplyByRules, averageValue: averageValue, percentage: percentage});
-		}
-	});
-	*/
 }
 
 /*
@@ -505,16 +257,6 @@
 			callback(true, ruleslist);
 		}
 	})
-	/*
-	con.query(sqlQuery, function (err, ruleslist) {
-		if (err) {
-			callback(false,err);
-		}
-		else{
-			callback(true, ruleslist);
-		}
-	});
-	*/
 }
 
 /*
@@ -535,21 +277,6 @@
 			}
 		}
 	})
-	/*
-	con.query(sql, function (err, res) {
-		if (err){
-			callback(false);
-		}
-		else{
-			if(res.length == 1){
-				callback(true, res);
-			}
-			else{
-				callback(false, "Invalid Token");
-			}
-		}
-	});
-	*/
 }
 
 /*
@@ -594,43 +321,6 @@
 			}
 		}
 	})
-	/*con.query(sql, function (err, res) {
-		if (err){ 
-			callback(false,err);
-		}
-		else{
-			if(res.length == 0){
-				callback(false,"AppID incorrect");
-			}
-			else{
-				var sqlNotifcations = "DELETE FROM notificationlist where token = '"+res[0].token+"'";
-				con.query(sqlNotifcations, function (err, rows) {
-					if (err) {
-						callback(false,err);
-					}
-					else{
-						var sqlRules = "DELETE FROM ruleslist where token = '"+res[0].token+"'";
-						con.query(sqlRules, function (err, rows) {
-							if (err) {
-								callback(false,err);
-							}
-							else{
-								var sqlQuery = "DELETE FROM registration where token = '"+res[0].token+"'";
-								con.query(sqlQuery, function (err, rows) {
-									if (err){ 
-										callback(false,err);
-									}
-									else{
-										callback(true, rows);
-									}
-								});
-							}
-						});
-					}
-				});
-			}
-		}
-	});*/
 }
 
 /*
@@ -651,19 +341,4 @@
 			}
 		}
 	})
-	/*
-	con.query(sqlQuery, function (err, rows) {
-		if (err) {
-			callback(false,err);
-		}
-		else{
-			if(rows.length == 0){
-				callback(false,"RuleID incorrect");
-			}
-			else{
-				callback(true,rows);
-			}
-		}
-	});
-	*/
 }