diff --git a/frontend-js/src/main/js/ConfigurationType.js b/frontend-js/src/main/js/ConfigurationType.js
index aa792f821a083b1e4dfbb66bbb720ca43a89ff2f..ca7078fe5cc21ffc87eaba1dd3516153ea8dd8b7 100644
--- a/frontend-js/src/main/js/ConfigurationType.js
+++ b/frontend-js/src/main/js/ConfigurationType.js
@@ -1,16 +1,17 @@
 "use strict";
 
 var ConfigurationType = {
-  DEFAULT_MAP : "DEFAULT_MAP",
-  GOOGLE_ANALYTICS_IDENTIFIER : "GOOGLE_ANALYTICS_IDENTIFIER",
-  LOGO_IMG : "LOGO_IMG",
-  LOGO_LINK : "LOGO_LINK",
-  LEGEND_FILES : "LEGEND_FILES",
-  MIN_COLOR_VAL : "MIN_COLOR_VAL",
-  MAX_COLOR_VAL : "MAX_COLOR_VAL",
-  SIMPLE_COLOR_VAL : "SIMPLE_COLOR_VAL",
-  SEARCH_DISTANCE : "SEARCH_DISTANCE",
-  USER_MANUAL_FILE : "USER_MANUAL_FILE",
+  DEFAULT_MAP: "DEFAULT_MAP",
+  GOOGLE_ANALYTICS_IDENTIFIER: "GOOGLE_ANALYTICS_IDENTIFIER",
+  LOGO_IMG: "LOGO_IMG",
+  LOGO_LINK: "LOGO_LINK",
+  LEGEND_FILES: "LEGEND_FILES",
+  MIN_COLOR_VAL: "MIN_COLOR_VAL",
+  MAX_COLOR_VAL: "MAX_COLOR_VAL",
+  REQUEST_ACCOUNT_EMAIL: "REQUEST_ACCOUNT_EMAIL",
+  SIMPLE_COLOR_VAL: "SIMPLE_COLOR_VAL",
+  SEARCH_DISTANCE: "SEARCH_DISTANCE",
+  USER_MANUAL_FILE: "USER_MANUAL_FILE",
 };
 
 module.exports = ConfigurationType;
diff --git a/frontend-js/src/main/js/ServerConnector.js b/frontend-js/src/main/js/ServerConnector.js
index 88b8109a4d4e84649e92eba0f963f543d44feb37..1d695eb8d60441c00c48f96b1984d63e8f32443a 100644
--- a/frontend-js/src/main/js/ServerConnector.js
+++ b/frontend-js/src/main/js/ServerConnector.js
@@ -45,13 +45,13 @@ ServerConnector.registerListenerType("onDataLoadStop");
 
 ServerConnector._configurationParam = [];
 
-ServerConnector.getMinOverlayColorInt = function() {
+ServerConnector.getMinOverlayColorInt = function () {
   var self = this;
   var userColor;
-  return self.getLoggedUser().then(function(user) {
+  return self.getLoggedUser().then(function (user) {
     userColor = user.getMinColor();
     return self.getConfigurationParam(ConfigurationType.MIN_COLOR_VAL);
-  }).then(function(systemMinColor) {
+  }).then(function (systemMinColor) {
     var color = userColor;
     if (userColor === null || userColor === undefined || userColor === "") {
       color = systemMinColor;
@@ -63,13 +63,13 @@ ServerConnector.getMinOverlayColorInt = function() {
   });
 };
 
-ServerConnector.getSimpleOverlayColorInt = function() {
+ServerConnector.getSimpleOverlayColorInt = function () {
   var self = this;
   var userColor;
-  return self.getLoggedUser().then(function(user) {
+  return self.getLoggedUser().then(function (user) {
     userColor = user.getSimpleColor();
     return self.getConfigurationParam(ConfigurationType.SIMPLE_COLOR_VAL);
-  }).then(function(systemSimpleColor) {
+  }).then(function (systemSimpleColor) {
     var color = userColor;
     if (userColor === null || userColor === undefined || userColor === "") {
       color = systemSimpleColor;
@@ -81,13 +81,13 @@ ServerConnector.getSimpleOverlayColorInt = function() {
   });
 };
 
-ServerConnector.getMaxOverlayColorInt = function() {
+ServerConnector.getMaxOverlayColorInt = function () {
   var self = this;
   var userColor;
-  return self.getLoggedUser().then(function(user) {
+  return self.getLoggedUser().then(function (user) {
     userColor = user.getMaxColor();
     return self.getConfigurationParam(ConfigurationType.MAX_COLOR_VAL);
-  }).then(function(systemMaxColor) {
+  }).then(function (systemMaxColor) {
     var color = userColor;
     if (userColor === null || userColor === undefined || userColor === "") {
       color = systemMaxColor;
@@ -99,7 +99,7 @@ ServerConnector.getMaxOverlayColorInt = function() {
   });
 };
 
-ServerConnector.readFile = function(url, description) {
+ServerConnector.readFile = function (url, description) {
   var self = this;
 
   if (self.getSessionData().getToken() === undefined) {
@@ -111,30 +111,30 @@ ServerConnector.readFile = function(url, description) {
     description = url;
   }
   var content;
-  return self.callListeners("onDataLoadStart", description).then(function() {
+  return self.callListeners("onDataLoadStart", description).then(function () {
     return self._readFile(url);
-  }).then(function(result) {
+  }).then(function (result) {
     content = result;
     return self.callListeners("onDataLoadStop", description);
-  }, function(error) {
-    return self.callListeners("onDataLoadStop", description).then(function() {
+  }, function (error) {
+    return self.callListeners("onDataLoadStop", description).then(function () {
       return Promise.reject(error);
     });
-  }).then(function() {
+  }).then(function () {
     return content;
   });
 };
 
-ServerConnector._readFile = function(url) {
-  return new Promise(function(resolve, reject) {
-    request.get(url, function(error, response, body) {
+ServerConnector._readFile = function (url) {
+  return new Promise(function (resolve, reject) {
+    request.get(url, function (error, response, body) {
       if (error) {
         reject(error);
       } else if (response.statusCode !== 200) {
         reject(new NetworkError(url + " rejected with status code: " + response.statusCode, {
-          content : body,
-          url : url,
-          statusCode : response.statusCode
+          content: body,
+          url: url,
+          statusCode: response.statusCode
         }));
       } else {
         resolve(body);
@@ -143,28 +143,28 @@ ServerConnector._readFile = function(url) {
   });
 };
 
-ServerConnector.sendPostRequest = function(url, params) {
+ServerConnector.sendPostRequest = function (url, params) {
   var self = this;
   if (self.getSessionData().getToken() === undefined) {
     self.getSessionData().setLogin(undefined);
     window.location.reload(false);
   }
-  return new Promise(function(resolve, reject) {
+  return new Promise(function (resolve, reject) {
     request.post({
-      url : url,
-      form : params
-    }, function(error, response, body) {
+      url: url,
+      form: params
+    }, function (error, response, body) {
       if (error) {
         reject(new NetworkError(error, {
-          content : body,
-          url : url
+          content: body,
+          url: url
         }));
 
       } else if (response.statusCode !== 200) {
         reject(new NetworkError(url + " rejected with status code: " + response.statusCode, {
-          content : body,
-          url : url,
-          statusCode : response.statusCode
+          content: body,
+          url: url,
+          statusCode: response.statusCode
         }));
       } else {
         resolve(body);
@@ -173,17 +173,17 @@ ServerConnector.sendPostRequest = function(url, params) {
   });
 };
 
-ServerConnector.sendPutRequest = function(url, params) {
+ServerConnector.sendPutRequest = function (url, params) {
   var self = this;
   if (self.getSessionData().getToken() === undefined) {
     self.getSessionData().setLogin(undefined);
     window.location.reload(false);
   }
-  return new Promise(function(resolve, reject) {
+  return new Promise(function (resolve, reject) {
     request.put({
-      url : url,
-      form : params
-    }, function(error, response, body) {
+      url: url,
+      form: params
+    }, function (error, response, body) {
       if (error) {
         reject(error);
       } else if (response.statusCode !== 200) {
@@ -195,18 +195,18 @@ ServerConnector.sendPutRequest = function(url, params) {
   });
 };
 
-ServerConnector.sendDeleteRequest = function(url, params) {
+ServerConnector.sendDeleteRequest = function (url, params) {
   var self = this;
   if (self.getSessionData().getToken() === undefined) {
     self.getSessionData().setLogin(undefined);
     window.location.reload(false);
   }
-  return new Promise(function(resolve, reject) {
+  return new Promise(function (resolve, reject) {
     request({
-      method : "DELETE",
-      url : url,
-      json : params,
-    }, function(error, response, body) {
+      method: "DELETE",
+      url: url,
+      json: params,
+    }, function (error, response, body) {
       if (error) {
         reject(error);
       } else if (response.statusCode !== 200) {
@@ -218,18 +218,18 @@ ServerConnector.sendDeleteRequest = function(url, params) {
   });
 };
 
-ServerConnector.sendPatchRequest = function(url, params) {
+ServerConnector.sendPatchRequest = function (url, params) {
   var self = this;
   if (self.getSessionData().getToken() === undefined) {
     self.getSessionData().setLogin(undefined);
     window.location.reload(false);
   }
-  return new Promise(function(resolve, reject) {
+  return new Promise(function (resolve, reject) {
     request({
-      method : "PATCH",
-      url : url,
-      json : params,
-    }, function(error, response, body) {
+      method: "PATCH",
+      url: url,
+      json: params,
+    }, function (error, response, body) {
       if (error) {
         reject(error);
       } else if (response.statusCode !== 200) {
@@ -241,7 +241,7 @@ ServerConnector.sendPatchRequest = function(url, params) {
   });
 };
 
-ServerConnector.getToken = function(token) {
+ServerConnector.getToken = function (token) {
   if (token !== undefined) {
     return Promise.resolve(token);
   }
@@ -255,10 +255,10 @@ ServerConnector.getToken = function(token) {
     // using current token
     if (self.getSessionData().getProject() === null) {
       return self.getConfiguration({
-        token : token
-      }).then(function() {
+        token: token
+      }).then(function () {
         return token;
-      }, function() {
+      }, function () {
         return self.login();
       });
     } else {
@@ -267,11 +267,11 @@ ServerConnector.getToken = function(token) {
   }
 };
 
-ServerConnector.getApiBaseUrl = function() {
+ServerConnector.getApiBaseUrl = function () {
   return this.getServerBaseUrl() + "/api/";
 };
 
-ServerConnector.getServerBaseUrl = function() {
+ServerConnector.getServerBaseUrl = function () {
   if (this._serverBaseUrl === undefined) {
     var url = "" + window.location.href;
     if (!url.endsWith("/")) {
@@ -282,7 +282,7 @@ ServerConnector.getServerBaseUrl = function() {
   return this._serverBaseUrl;
 };
 
-ServerConnector.createGetParams = function(params, prefix) {
+ServerConnector.createGetParams = function (params, prefix) {
   var sorted = [], key;
 
   for (key in params) {
@@ -318,7 +318,7 @@ ServerConnector.createGetParams = function(params, prefix) {
   return result;
 };
 
-ServerConnector.getApiUrl = function(paramObj) {
+ServerConnector.getApiUrl = function (paramObj) {
   var type = paramObj.type;
   var method = paramObj.method;
   var params = this.createGetParams(paramObj.params);
@@ -336,85 +336,85 @@ ServerConnector.getApiUrl = function(paramObj) {
   return result;
 };
 
-ServerConnector.getProjectsUrl = function(queryParams, filterParams) {
+ServerConnector.getProjectsUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    type : "projects/" + queryParams.projectId + "/",
-    params : filterParams,
+    type: "projects/" + queryParams.projectId + "/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getProjectStatisticsUrl = function(queryParams, filterParams) {
+ServerConnector.getProjectStatisticsUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "statistics/",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "statistics/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getPublicationsUrl = function(queryParams, filterParams) {
+ServerConnector.getPublicationsUrl = function (queryParams, filterParams) {
   filterParams.start = filterParams.start || 0;
   filterParams.length = filterParams.length || 10;
 
   return this.getApiUrl({
-    url : this.getModelsUrl(queryParams) + "publications/",
-    params : filterParams,
+    url: this.getModelsUrl(queryParams) + "publications/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getReferenceGenomeUrl = function(queryParams, filterParams) {
+ServerConnector.getReferenceGenomeUrl = function (queryParams, filterParams) {
   var version = this.getIdOrAsterisk(queryParams.version);
 
   return this.getApiUrl({
-    type : "genomics/taxonomies/" + queryParams.organism + "/genomeTypes/" + queryParams.type + "/versions/" + version
-        + "/",
-    params : filterParams
+    type: "genomics/taxonomies/" + queryParams.organism + "/genomeTypes/" + queryParams.type + "/versions/" + version
+    + "/",
+    params: filterParams
   });
 };
 
-ServerConnector.loginUrl = function() {
+ServerConnector.loginUrl = function () {
   return this.getApiUrl({
-    type : "/doLogin",
+    type: "/doLogin",
   });
 };
 
-ServerConnector.getSuggestedQueryListUrl = function(queryParams, filterParams) {
+ServerConnector.getSuggestedQueryListUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getBioEntitiesUrl(queryParams) + "suggestedQueryList/",
-    params : filterParams,
+    url: this.getBioEntitiesUrl(queryParams) + "suggestedQueryList/",
+    params: filterParams,
   });
 };
 
-ServerConnector.addCommentUrl = function(queryParams) {
+ServerConnector.addCommentUrl = function (queryParams) {
   return this.getApiUrl({
-    url : this.getCommentsUrl(queryParams)
+    url: this.getCommentsUrl(queryParams)
   });
 };
 
-ServerConnector.addOverlayUrl = function(queryParams) {
+ServerConnector.addOverlayUrl = function (queryParams) {
   return this.getApiUrl({
-    url : this.getOverlaysUrl(queryParams)
+    url: this.getOverlaysUrl(queryParams)
   });
 };
 
-ServerConnector.updateOverlayUrl = function(queryParams) {
+ServerConnector.updateOverlayUrl = function (queryParams) {
   return this.getApiUrl({
-    url : this.getOverlayByIdUrl(queryParams)
+    url: this.getOverlayByIdUrl(queryParams)
   });
 };
 
-ServerConnector.deleteOverlayUrl = function(queryParams) {
+ServerConnector.deleteOverlayUrl = function (queryParams) {
   return this.getApiUrl({
-    url : this.getOverlayByIdUrl(queryParams),
+    url: this.getOverlayByIdUrl(queryParams),
   });
 };
 
-ServerConnector.getOverlaysUrl = function(queryParams, filterParams) {
+ServerConnector.getOverlaysUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "overlays/",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "overlays/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getCommentsUrl = function(queryParams, filterParams) {
+ServerConnector.getCommentsUrl = function (queryParams, filterParams) {
   var modelId = this.getIdOrAsterisk(queryParams.modelId);
   var url = this.getProjectsUrl(queryParams) + "comments/models/" + modelId + "/";
   if (queryParams.elementType !== undefined) {
@@ -429,41 +429,41 @@ ServerConnector.getCommentsUrl = function(queryParams, filterParams) {
     }
   }
   return this.getApiUrl({
-    url : url,
-    params : filterParams,
+    url: url,
+    params: filterParams,
   });
 };
 
-ServerConnector.getOverlayByIdUrl = function(queryParams, filterParams) {
+ServerConnector.getOverlayByIdUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getOverlaysUrl(queryParams) + queryParams.overlayId + "/",
-    params : filterParams,
+    url: this.getOverlaysUrl(queryParams) + queryParams.overlayId + "/",
+    params: filterParams,
   });
 
 };
 
-ServerConnector.getOverlayElementsUrl = function(queryParams, filterParams) {
+ServerConnector.getOverlayElementsUrl = function (queryParams, filterParams) {
 
   return this.getApiUrl({
-    url : this.getModelsUrl(queryParams) + "bioEntities/",
-    params : filterParams,
+    url: this.getModelsUrl(queryParams) + "bioEntities/",
+    params: filterParams,
   });
 
 };
 
-ServerConnector.getFullOverlayElementUrl = function(queryParams, filterParams) {
+ServerConnector.getFullOverlayElementUrl = function (queryParams, filterParams) {
 
   return this.getApiUrl({
-    url : this.getAliasesUrl(queryParams) + queryParams.id + "/",
-    params : filterParams,
+    url: this.getAliasesUrl(queryParams) + queryParams.id + "/",
+    params: filterParams,
   });
 
 };
 
-ServerConnector.idsToString = function(ids) {
+ServerConnector.idsToString = function (ids) {
   var result = "";
   if (ids !== undefined) {
-    ids.sort(function(a, b) {
+    ids.sort(function (a, b) {
       return a - b;
     });
     for (var i = 0; i < ids.length; i++) {
@@ -479,18 +479,18 @@ ServerConnector.idsToString = function(ids) {
   return result;
 };
 
-ServerConnector.pointToString = function(point) {
+ServerConnector.pointToString = function (point) {
   return point.x.toFixed(2) + "," + point.y.toFixed(2);
 };
 
-ServerConnector.columnsToString = function(columns) {
+ServerConnector.columnsToString = function (columns) {
   if (columns === undefined) {
     return "";
   }
   return columns;
 };
 
-ServerConnector.getModelsUrl = function(queryParams) {
+ServerConnector.getModelsUrl = function (queryParams) {
   var modelId = this.getIdOrAsterisk(queryParams.modelId);
   var overlayId = queryParams.overlayId;
   var url = this.getProjectsUrl(queryParams);
@@ -499,17 +499,17 @@ ServerConnector.getModelsUrl = function(queryParams) {
   }
 
   return this.getApiUrl({
-    url : url + "models/" + modelId + "/",
+    url: url + "models/" + modelId + "/",
   });
 };
 
-ServerConnector.getBioEntitiesUrl = function(queryParams) {
+ServerConnector.getBioEntitiesUrl = function (queryParams) {
   return this.getApiUrl({
-    url : this.getModelsUrl(queryParams) + "bioEntities/",
+    url: this.getModelsUrl(queryParams) + "bioEntities/",
   });
 };
 
-ServerConnector.getIdOrAsterisk = function(id) {
+ServerConnector.getIdOrAsterisk = function (id) {
   if (id === undefined || id === "" || id === null) {
     return "*";
   } else {
@@ -517,99 +517,99 @@ ServerConnector.getIdOrAsterisk = function(id) {
   }
 };
 
-ServerConnector.getReactionsUrl = function(queryParams, filterParams) {
+ServerConnector.getReactionsUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getBioEntitiesUrl(queryParams) + "reactions/",
-    params : filterParams,
+    url: this.getBioEntitiesUrl(queryParams) + "reactions/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getAliasesUrl = function(queryParams, filterParams) {
+ServerConnector.getAliasesUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getBioEntitiesUrl(queryParams) + "elements/",
-    params : filterParams,
+    url: this.getBioEntitiesUrl(queryParams) + "elements/",
+    params: filterParams,
   });
 };
 
-ServerConnector.getConfigurationUrl = function(queryParams, filterParams) {
+ServerConnector.getConfigurationUrl = function (queryParams, filterParams) {
   var result = this.getApiUrl({
-    type : "configuration/",
-    params : filterParams
+    type: "configuration/",
+    params: filterParams
   });
   return result;
 };
 
-ServerConnector.getSearchUrl = function(queryParams, filterParams) {
+ServerConnector.getSearchUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getModelsUrl(queryParams) + "bioEntities:search",
-    params : filterParams,
+    url: this.getModelsUrl(queryParams) + "bioEntities:search",
+    params: filterParams,
   });
 };
 
-ServerConnector.getSearchDrugsUrl = function(queryParams, filterParams) {
+ServerConnector.getSearchDrugsUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "drugs:search",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "drugs:search",
+    params: filterParams,
   });
 };
 
-ServerConnector.getSearchMiRnasUrl = function(queryParams, filterParams) {
+ServerConnector.getSearchMiRnasUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "miRnas:search",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "miRnas:search",
+    params: filterParams,
   });
 };
 
-ServerConnector.getSearchChemicalsUrl = function(queryParams, filterParams) {
+ServerConnector.getSearchChemicalsUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "chemicals:search",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "chemicals:search",
+    params: filterParams,
   });
 };
 
-ServerConnector.getOverlaySourceUrl = function(queryParams, filterParams) {
+ServerConnector.getOverlaySourceUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getOverlaysUrl(queryParams) + queryParams.overlayId + ":downloadSource",
-    params : filterParams
+    url: this.getOverlaysUrl(queryParams) + queryParams.overlayId + ":downloadSource",
+    params: filterParams
   });
 };
 
-ServerConnector.getImageUrl = function(queryParams, filterParams) {
+ServerConnector.getImageUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "models/" + queryParams.modelId + ":downloadImage",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "models/" + queryParams.modelId + ":downloadImage",
+    params: filterParams,
   });
 };
 
-ServerConnector.getModelPartUrl = function(queryParams, filterParams) {
+ServerConnector.getModelPartUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    url : this.getProjectsUrl(queryParams) + "models/" + queryParams.modelId + ":downloadModel",
-    params : filterParams,
+    url: this.getProjectsUrl(queryParams) + "models/" + queryParams.modelId + ":downloadModel",
+    params: filterParams,
   });
 };
 
-ServerConnector.getProjectSourceUrl = function(queryParams, filterParams) {
+ServerConnector.getProjectSourceUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    type : "projects/" + queryParams.projectId + ":downloadSource",
-    params : filterParams
+    type: "projects/" + queryParams.projectId + ":downloadSource",
+    params: filterParams
   });
 };
 
-ServerConnector.getUserUrl = function(queryParams, filterParams) {
+ServerConnector.getUserUrl = function (queryParams, filterParams) {
   return this.getApiUrl({
-    type : "users/",
-    method : queryParams.login,
-    params : filterParams,
+    type: "users/",
+    method: queryParams.login,
+    params: filterParams,
   });
 };
 
-ServerConnector.getConfiguration = function(params) {
+ServerConnector.getConfiguration = function (params) {
   if (params === undefined) {
     params = {};
   }
   var self = this;
   if (this._configuration === undefined) {
-    return self.readFile(self.getConfigurationUrl()).then(function(content) {
+    return self.readFile(self.getConfigurationUrl()).then(function (content) {
       self._configuration = new Configuration(JSON.parse(content));
       return Promise.resolve(self._configuration);
     });
@@ -618,22 +618,25 @@ ServerConnector.getConfiguration = function(params) {
   }
 };
 
-ServerConnector.getConfigurationParam = function(paramId) {
+ServerConnector.getConfigurationParam = function (paramId) {
+  if (paramId === undefined) {
+    return Promise.reject(new Error("Unknown param type"));
+  }
   var self = this;
-  return self.getConfiguration().then(function(configuration) {
+  return self.getConfiguration().then(function (configuration) {
     return configuration.getOption(paramId);
   });
 };
 
-ServerConnector.getModels = function(projectId) {
+ServerConnector.getModels = function (projectId) {
   var queryParams = {};
   var filterParams = {};
   var project;
   var self = this;
-  return self.getProjectId(projectId).then(function(result) {
+  return self.getProjectId(projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getModelsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var models = [];
     var parsedJson = JSON.parse(content);
     for (var i = 0; i < parsedJson.length; i++) {
@@ -642,32 +645,32 @@ ServerConnector.getModels = function(projectId) {
     return models;
   });
 };
-ServerConnector.getProject = function(projectId) {
+ServerConnector.getProject = function (projectId) {
   var queryParams = {};
   var filterParams = {};
   var project;
   var self = this;
-  return self.getProjectId(projectId).then(function(result) {
+  return self.getProjectId(projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getProjectsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     project = new Project(content);
     return self.getModels(projectId);
-  }).then(function(models) {
+  }).then(function (models) {
     project.setModel(models[0]);
     return self.getOverlays(projectId);
-  }).then(function(overlays) {
+  }).then(function (overlays) {
     project.getModel().addLayouts(overlays);
     return project;
-  }).then(null, function(error) {
+  }).then(null, function (error) {
     if ((error instanceof NetworkError)) {
       switch (error.statusCode) {
-      case HttpStatus.NOT_FOUND:
-        return null;
-      case HttpStatus.FORBIDDEN:
-        return Promise.reject(new SecurityError("Access denied."));
-      default:
-        return Promise.reject(error);
+        case HttpStatus.NOT_FOUND:
+          return null;
+        case HttpStatus.FORBIDDEN:
+          return Promise.reject(new SecurityError("Access denied."));
+        default:
+          return Promise.reject(error);
       }
     } else {
       return Promise.reject(error);
@@ -675,56 +678,56 @@ ServerConnector.getProject = function(projectId) {
   });
 };
 
-ServerConnector.getProjectStatistics = function(projectId) {
+ServerConnector.getProjectStatistics = function (projectId) {
   var queryParams = {};
   var filterParams = {};
   var self = this;
   var content;
-  return self.getProjectId(projectId).then(function(result) {
+  return self.getProjectId(projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getProjectStatisticsUrl(queryParams, filterParams));
-  }).then(function(result) {
+  }).then(function (result) {
     content = JSON.parse(result);
     return self.getConfiguration();
-  }).then(function(configuration) {
+  }).then(function (configuration) {
     return new ProjectStatistics(content, configuration);
   });
 };
 
-ServerConnector.getLoggedUser = function() {
+ServerConnector.getLoggedUser = function () {
   var self = this;
   if (self._loggedUser !== undefined) {
     return Promise.resolve(self._loggedUser);
   } else {
-    return self.getUser(self.getSessionData().getLogin()).then(function(user) {
+    return self.getUser(self.getSessionData().getLogin()).then(function (user) {
       self._loggedUser = user;
       return self._loggedUser;
     });
   }
 };
 
-ServerConnector.getUser = function(login) {
+ServerConnector.getUser = function (login) {
   var self = this;
   var queryParams = {
-    login : login,
+    login: login,
   };
   var filterParams = {};
 
-  return self.readFile(self.getUserUrl(queryParams, filterParams)).then(function(content) {
+  return self.readFile(self.getUserUrl(queryParams, filterParams)).then(function (content) {
     var obj = JSON.parse(content);
     return new User(obj);
   });
 };
 
-ServerConnector.getOverlays = function(projectId) {
+ServerConnector.getOverlays = function (projectId) {
   var self = this;
   var queryParams = {};
   var filterParams = {};
-  return new Promise(function(resolve, reject) {
-    self.getProjectId(projectId).then(function(result) {
+  return new Promise(function (resolve, reject) {
+    self.getProjectId(projectId).then(function (result) {
       queryParams.projectId = result;
       return self.readFile(self.getOverlaysUrl(queryParams, filterParams));
-    }).then(function(content) {
+    }).then(function (content) {
       var arr = JSON.parse(content);
       var result = [];
       for (var i = 0; i < arr.length; i++) {
@@ -736,20 +739,20 @@ ServerConnector.getOverlays = function(projectId) {
   });
 };
 
-ServerConnector.getOverlayElements = function(overlayId, projectId) {
+ServerConnector.getOverlayElements = function (overlayId, projectId) {
   var self = this;
   if (overlayId === undefined) {
     throw new Error("Layout id must be defined");
   }
   var queryParams = {
-    overlayId : overlayId,
-    modelId : "*",
+    overlayId: overlayId,
+    modelId: "*",
   };
   var filterParams = {};
-  return self.getProjectId(projectId).then(function(result) {
+  return self.getProjectId(projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getOverlayElementsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var arr = JSON.parse(content);
     var result = [];
     for (var i = 0; i < arr.length; i++) {
@@ -766,20 +769,20 @@ ServerConnector.getOverlayElements = function(overlayId, projectId) {
   });
 };
 
-ServerConnector.getFullOverlayElement = function(params) {
+ServerConnector.getFullOverlayElement = function (params) {
   var self = this;
 
   var queryParams = {
-    overlayId : params.overlay.getId(),
-    modelId : params.element.getModelId(),
-    id : params.element.getId(),
+    overlayId: params.overlay.getId(),
+    modelId: params.element.getModelId(),
+    id: params.element.getId(),
   };
   var filterParams = {};
 
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getFullOverlayElementUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var element = JSON.parse(content);
     var result = null;
     if (element.type === "REACTION") {
@@ -793,7 +796,7 @@ ServerConnector.getFullOverlayElement = function(params) {
   });
 };
 
-ServerConnector.getProjectId = function(projectId) {
+ServerConnector.getProjectId = function (projectId) {
   var self = this;
   if (projectId !== undefined && projectId !== null && projectId !== "") {
     return Promise.resolve(projectId);
@@ -804,44 +807,44 @@ ServerConnector.getProjectId = function(projectId) {
   }
 };
 
-ServerConnector.getLogoImg = function() {
+ServerConnector.getLogoImg = function () {
   return this.getConfigurationParam(ConfigurationType.LOGO_IMG);
 };
 
-ServerConnector.getLogoLink = function() {
+ServerConnector.getLogoLink = function () {
   return this.getConfigurationParam(ConfigurationType.LOGO_LINK);
 };
 
-ServerConnector.getMaxSearchDistance = function() {
+ServerConnector.getMaxSearchDistance = function () {
   return this.getConfigurationParam(ConfigurationType.SEARCH_DISTANCE);
 };
 
-ServerConnector.getOverlayById = function(overlayId, projectId) {
+ServerConnector.getOverlayById = function (overlayId, projectId) {
   var self = this;
   var queryParams = {
-    overlayId : overlayId
+    overlayId: overlayId
   };
   var filterParams = {};
-  return self.getProjectId(projectId).then(function(data) {
+  return self.getProjectId(projectId).then(function (data) {
     queryParams.projectId = data;
     return self.readFile(self.getOverlayByIdUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     return new LayoutData(JSON.parse(content));
   });
 };
 
-ServerConnector.getReactions = function(params) {
+ServerConnector.getReactions = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    id : params.ids,
-    columns : params.columns,
-    participantId : params.participantId,
+    id: params.ids,
+    columns: params.columns,
+    participantId: params.participantId,
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getReactionsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -851,27 +854,27 @@ ServerConnector.getReactions = function(params) {
   });
 };
 
-ServerConnector.getAliases = function(params) {
+ServerConnector.getAliases = function (params) {
   var self = this;
   var queryParams = {
-    modelId : params.modelId,
+    modelId: params.modelId,
   };
   if (params.ids === undefined) {
     params.ids = [];
   }
   var filterParams = {
-    id : params.ids,
-    columns : params.columns,
-    type : params.type,
+    id: params.ids,
+    columns: params.columns,
+    type: params.type,
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     if (filterParams.id.length > 100) {
       return self.sendPostRequest(self.getAliasesUrl(queryParams), filterParams);
     } else {
       return self.readFile(self.getAliasesUrl(queryParams, filterParams));
     }
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -881,25 +884,25 @@ ServerConnector.getAliases = function(params) {
   });
 };
 
-ServerConnector.getLightComments = function(params) {
-  params.columns = [ "id", "elementId", "modelId", "type", "icon", "removed", "pinned" ];
+ServerConnector.getLightComments = function (params) {
+  params.columns = ["id", "elementId", "modelId", "type", "icon", "removed", "pinned"];
   return this.getComments(params);
 };
 
-ServerConnector.getComments = function(params) {
+ServerConnector.getComments = function (params) {
   var self = this;
   var queryParams = {
-    elementId : params.elementId,
-    elementType : params.elementType,
-    coordinates : params.coordinates,
+    elementId: params.elementId,
+    elementType: params.elementType,
+    coordinates: params.coordinates,
   };
   var filterParams = {
-    columns : params.columns
+    columns: params.columns
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getCommentsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -909,7 +912,7 @@ ServerConnector.getComments = function(params) {
   });
 };
 
-ServerConnector.getSessionData = function(project) {
+ServerConnector.getSessionData = function (project) {
   if (this._sessionData === undefined) {
     this._sessionData = new SessionData(project);
   }
@@ -919,19 +922,19 @@ ServerConnector.getSessionData = function(project) {
   return this._sessionData;
 };
 
-ServerConnector.getClosestElementsByCoordinates = function(params) {
+ServerConnector.getClosestElementsByCoordinates = function (params) {
   var self = this;
   var queryParams = {
-    modelId : params.modelId
+    modelId: params.modelId
   };
   var filterParams = {
-    coordinates : params.coordinates,
-    count : params.count,
+    coordinates: params.coordinates,
+    count: params.count,
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -941,7 +944,7 @@ ServerConnector.getClosestElementsByCoordinates = function(params) {
   });
 };
 
-ServerConnector.login = function(login, password) {
+ServerConnector.login = function (login, password) {
   var self = this;
   var params = {};
   if (login !== undefined) {
@@ -951,10 +954,10 @@ ServerConnector.login = function(login, password) {
     params.login = "anonymous";
   }
   self.getSessionData().setToken("");
-  return self.sendPostRequest(self.loginUrl(), params).then(function() {
+  return self.sendPostRequest(self.loginUrl(), params).then(function () {
     self.getSessionData().setLogin(params.login);
     return Promise.resolve(self.getSessionData().getToken());
-  }, function(error) {
+  }, function (error) {
     if (error instanceof NetworkError && error.statusCode === HttpStatus.FORBIDDEN) {
       throw new InvalidCredentialsError("Invalid credentials");
     } else {
@@ -963,27 +966,27 @@ ServerConnector.login = function(login, password) {
   });
 };
 
-ServerConnector.logout = function() {
+ServerConnector.logout = function () {
   var self = this;
   self.getSessionData().setToken(undefined);
   self.getSessionData().setLogin(undefined);
   return Promise.resolve();
 };
 
-ServerConnector.getElementsByQuery = function(params) {
+ServerConnector.getElementsByQuery = function (params) {
   var self = this;
   var queryParams = {
-    modelId : params.modelId
+    modelId: params.modelId
   };
   var filterParams = {
-    query : params.query,
-    perfectMatch : params.perfectMatch,
+    query: params.query,
+    perfectMatch: params.perfectMatch,
   };
 
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -993,16 +996,16 @@ ServerConnector.getElementsByQuery = function(params) {
   });
 };
 
-ServerConnector.getDrugsByQuery = function(params) {
+ServerConnector.getDrugsByQuery = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    query : params.query
+    query: params.query
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchDrugsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -1012,16 +1015,16 @@ ServerConnector.getDrugsByQuery = function(params) {
   });
 };
 
-ServerConnector.getMiRnasByQuery = function(params) {
+ServerConnector.getMiRnasByQuery = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    query : params.query
+    query: params.query
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchMiRnasUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -1031,16 +1034,16 @@ ServerConnector.getMiRnasByQuery = function(params) {
   });
 };
 
-ServerConnector.getChemicalsByQuery = function(params) {
+ServerConnector.getChemicalsByQuery = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    query : params.query
+    query: params.query
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchChemicalsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var array = JSON.parse(content);
     var result = [];
     for (var i = 0; i < array.length; i++) {
@@ -1050,96 +1053,96 @@ ServerConnector.getChemicalsByQuery = function(params) {
   });
 };
 
-ServerConnector.getOverlaySourceDownloadUrl = function(params) {
+ServerConnector.getOverlaySourceDownloadUrl = function (params) {
   var self = this;
   var queryParams = {
-    overlayId : params.overlayId
+    overlayId: params.overlayId
   };
   var filterParams = {};
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.getOverlaySourceUrl(queryParams, filterParams);
   });
 };
 
-ServerConnector.getImageDownloadUrl = function(params) {
+ServerConnector.getImageDownloadUrl = function (params) {
   var self = this;
   var queryParams = {
-    projectId : params.projectId,
-    modelId : params.modelId,
+    projectId: params.projectId,
+    modelId: params.modelId,
   };
   var filterParams = {
-    token : params.token,
-    polygonString : params.polygonString,
-    handlerClass : params.handlerClass,
-    backgroundOverlayId : params.backgroundOverlayId,
-    zoomLevel : params.zoomLevel,
-    overlayIds : this.idsToString(params.overlayIds),
+    token: params.token,
+    polygonString: params.polygonString,
+    handlerClass: params.handlerClass,
+    backgroundOverlayId: params.backgroundOverlayId,
+    zoomLevel: params.zoomLevel,
+    overlayIds: this.idsToString(params.overlayIds),
   };
 
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.getImageUrl(queryParams, filterParams);
   });
 };
 
-ServerConnector.getModelDownloadUrl = function(params) {
+ServerConnector.getModelDownloadUrl = function (params) {
   var self = this;
   var queryParams = {
-    projectId : params.projectId,
-    modelId : params.modelId,
+    projectId: params.projectId,
+    modelId: params.modelId,
   };
   var filterParams = {
-    token : params.token,
-    polygonString : params.polygonString,
-    handlerClass : params.handlerClass,
-    backgroundOverlayId : params.backgroundOverlayId,
-    zoomLevel : params.zoomLevel,
-    overlayIds : this.idsToString(params.overlayIds),
+    token: params.token,
+    polygonString: params.polygonString,
+    handlerClass: params.handlerClass,
+    backgroundOverlayId: params.backgroundOverlayId,
+    zoomLevel: params.zoomLevel,
+    overlayIds: this.idsToString(params.overlayIds),
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.getModelPartUrl(queryParams, filterParams);
   });
 };
 
-ServerConnector.getImageConverters = function() {
+ServerConnector.getImageConverters = function () {
   var self = this;
-  return self.getConfiguration().then(function(configuration) {
+  return self.getConfiguration().then(function (configuration) {
     return configuration.getImageConverters();
   });
 };
-ServerConnector.getModelConverters = function() {
+ServerConnector.getModelConverters = function () {
   var self = this;
-  return self.getConfiguration().then(function(configuration) {
+  return self.getConfiguration().then(function (configuration) {
     return configuration.getModelConverters();
   });
 };
 
-ServerConnector.getProjectSourceDownloadUrl = function(params) {
+ServerConnector.getProjectSourceDownloadUrl = function (params) {
   if (params === undefined) {
     params = {};
   }
   var queryParams = {};
   var filterParams = {};
   var self = this;
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.getProjectSourceUrl(queryParams, filterParams);
   });
 };
 
-ServerConnector.getDrugNamesByTarget = function(params) {
+ServerConnector.getDrugNamesByTarget = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    columns : [ "name" ],
-    target : params.target.getType() + ":" + params.target.getId()
+    columns: ["name"],
+    target: params.target.getType() + ":" + params.target.getId()
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchDrugsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var result = [];
     var object = JSON.parse(content);
     for (var i = 0; i < object.length; i++) {
@@ -1149,17 +1152,17 @@ ServerConnector.getDrugNamesByTarget = function(params) {
   });
 };
 
-ServerConnector.getMiRnaNamesByTarget = function(params) {
+ServerConnector.getMiRnaNamesByTarget = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    columns : [ "name" ],
-    target : params.target.getType() + ":" + params.target.getId()
+    columns: ["name"],
+    target: params.target.getType() + ":" + params.target.getId()
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchMiRnasUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var result = [];
     var object = JSON.parse(content);
     for (var i = 0; i < object.length; i++) {
@@ -1169,17 +1172,17 @@ ServerConnector.getMiRnaNamesByTarget = function(params) {
   });
 };
 
-ServerConnector.getChemicalNamesByTarget = function(params) {
+ServerConnector.getChemicalNamesByTarget = function (params) {
   var self = this;
   var queryParams = {};
   var filterParams = {
-    columns : [ "name" ],
-    target : params.target.getType() + ":" + params.target.getId()
+    columns: ["name"],
+    target: params.target.getType() + ":" + params.target.getId()
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getSearchChemicalsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     var result = [];
     var object = JSON.parse(content);
     for (var i = 0; i < object.length; i++) {
@@ -1189,13 +1192,13 @@ ServerConnector.getChemicalNamesByTarget = function(params) {
   });
 };
 
-ServerConnector.addComment = function(params) {
+ServerConnector.addComment = function (params) {
   var self = this;
   var queryParams = {
-    elementId : params.elementId,
-    elementType : params.elementType,
-    coordinates : self.pointToString(params.coordinates),
-    modelId : params.modelId,
+    elementId: params.elementId,
+    elementType: params.elementType,
+    coordinates: self.pointToString(params.coordinates),
+    modelId: params.modelId,
   };
   var filterParams = params;
   delete filterParams.elementId;
@@ -1206,33 +1209,33 @@ ServerConnector.addComment = function(params) {
     filterParams.coordinates = self.pointToString(params.coordinates);
   }
   delete filterParams.modelId;
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.sendPostRequest(self.addCommentUrl(queryParams), filterParams);
-  }).then(function(content) {
+  }).then(function (content) {
     var response = JSON.parse(content);
     return new Comment(response);
   });
 };
 
-ServerConnector.addOverlay = function(params) {
+ServerConnector.addOverlay = function (params) {
   var self = this;
   var queryParams = {};
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.sendPostRequest(self.addOverlayUrl(queryParams), params);
-  }).then(function(content) {
+  }).then(function (content) {
     return new LayoutData(JSON.parse(content));
   });
 };
 
-ServerConnector.updateOverlay = function(params) {
+ServerConnector.updateOverlay = function (params) {
   var self = this;
   var queryParams = {
-    overlayId : params.overlayId
+    overlayId: params.overlayId
   };
   var filterParams = {
-    overlay : {}
+    overlay: {}
   };
   if (params.name !== undefined) {
     filterParams.overlay.name = params.name;
@@ -1240,44 +1243,44 @@ ServerConnector.updateOverlay = function(params) {
   if (params.description !== undefined) {
     filterParams.overlay.description = params.description;
   }
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.sendPatchRequest(self.updateOverlayUrl(queryParams), filterParams);
   });
 };
 
-ServerConnector.removeOverlay = function(params) {
+ServerConnector.removeOverlay = function (params) {
   var self = this;
   var queryParams = {
-    overlayId : params.overlayId
+    overlayId: params.overlayId
   };
   var filterParams = {};
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.sendDeleteRequest(self.deleteOverlayUrl(queryParams), filterParams);
   });
 };
 
-ServerConnector.getSuggestedQueryList = function(projectId) {
+ServerConnector.getSuggestedQueryList = function (projectId) {
   var self = this;
-  return self.getProjectId(projectId).then(function(result) {
+  return self.getProjectId(projectId).then(function (result) {
     projectId = result;
     return self.readFile(self.getSuggestedQueryListUrl({
-      projectId : projectId
+      projectId: projectId
     }));
-  }).then(function(content) {
+  }).then(function (content) {
     return JSON.parse(content);
   });
 };
 
-ServerConnector.getOverlayTypes = function() {
+ServerConnector.getOverlayTypes = function () {
   var self = this;
-  return self.getConfiguration().then(function(configuration) {
+  return self.getConfiguration().then(function (configuration) {
     return configuration.getOverlayTypes();
   });
 };
 
-ServerConnector.getPublications = function(params) {
+ServerConnector.getPublications = function (params) {
   var self = this;
   if (params === undefined) {
     params = {};
@@ -1285,24 +1288,24 @@ ServerConnector.getPublications = function(params) {
 
   var queryParams = {};
   var filterParams = {
-    start : params.start,
-    length : params.length,
-    sortColumn : params.sortColumn,
-    sortOrder : params.sortOrder,
-    search : params.search,
+    start: params.start,
+    length: params.length,
+    sortColumn: params.sortColumn,
+    sortOrder: params.sortOrder,
+    search: params.search,
   };
-  return self.getProjectId(params.projectId).then(function(result) {
+  return self.getProjectId(params.projectId).then(function (result) {
     queryParams.projectId = result;
     return self.readFile(self.getPublicationsUrl(queryParams, filterParams));
-  }).then(function(content) {
+  }).then(function (content) {
     return JSON.parse(content);
   });
 };
 
-ServerConnector.getReferenceGenome = function(params) {
+ServerConnector.getReferenceGenome = function (params) {
   var self = this;
   var filterParams = {};
-  return self.readFile(self.getReferenceGenomeUrl(params, filterParams)).then(function(content) {
+  return self.readFile(self.getReferenceGenomeUrl(params, filterParams)).then(function (content) {
     return new ReferenceGenome(JSON.parse(content));
   });
 };
diff --git a/frontend-js/src/main/js/gui/CommentDialog.js b/frontend-js/src/main/js/gui/CommentDialog.js
index 5f4fe6f82785119e6837b89fb0ab56484c6ed9d8..1974a065715d6907b2c1b95be4a7f86a3ba1d375 100644
--- a/frontend-js/src/main/js/gui/CommentDialog.js
+++ b/frontend-js/src/main/js/gui/CommentDialog.js
@@ -85,6 +85,8 @@ CommentDialog.prototype._createGui = function() {
   pinnedLabel.innerHTML = "Pinned";
   var pinnedCheckbox = document.createElement('input');
   pinnedCheckbox.type = "checkbox";
+  pinnedCheckbox.checked = "checked";
+
 
   table.appendChild(createRow([ pinnedLabel, pinnedCheckbox ]));
   this.setPinnedCheckbox(pinnedCheckbox);
diff --git a/frontend-js/src/main/js/gui/LoginDialog.js b/frontend-js/src/main/js/gui/LoginDialog.js
index eea1b05d7fc1c274bd3df08796080142e9d104ac..3df04cffff422f59c05771a8e0424f6c88160096 100644
--- a/frontend-js/src/main/js/gui/LoginDialog.js
+++ b/frontend-js/src/main/js/gui/LoginDialog.js
@@ -6,6 +6,7 @@ var AbstractGuiElement = require('./AbstractGuiElement');
 var GuiConnector = require('../GuiConnector');
 var InvalidCredentialsError = require('../InvalidCredentialsError');
 var PanelControlElementType = require('./PanelControlElementType');
+var ConfigurationType = require("../ConfigurationType");
 
 var Functions = require('../Functions');
 var logger = require('../logger');
@@ -15,18 +16,18 @@ function LoginDialog(params) {
   var self = this;
   self._createLoginTab();
   $(self.getElement()).dialog({
-    autoOpen : false,
-    resizable : false,
+    autoOpen: false,
+    resizable: false,
   });
 
   var loginButton = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_BUTTON);
-  loginButton.onclick = function() {
+  loginButton.onclick = function () {
     var login = self.getControlElement(PanelControlElementType.USER_TAB_LOGIN_INPUT_TEXT).value;
     var password = self.getControlElement(PanelControlElementType.USER_TAB_PASSOWRD_INPUT_TEXT).value;
 
-    return ServerConnector.login(login, password).then(function() {
+    return ServerConnector.login(login, password).then(function () {
       window.location.reload(false);
-    }).then(null, function(error) {
+    }).then(null, function (error) {
       if (error instanceof InvalidCredentialsError) {
         GuiConnector.alert("invalid credentials");
       } else {
@@ -40,16 +41,16 @@ function LoginDialog(params) {
 LoginDialog.prototype = Object.create(AbstractGuiElement.prototype);
 LoginDialog.prototype.constructor = LoginDialog;
 
-LoginDialog.prototype.createTableRow = function(elements) {
+LoginDialog.prototype.createTableRow = function (elements) {
   var row = Functions.createElement({
-    type : "div",
-    style : "display: table-row;"
+    type: "div",
+    style: "display: table-row;"
   });
 
   for (var i = 0; i < elements.length; i++) {
     var cell = Functions.createElement({
-      type : "div",
-      style : "display: table-cell;"
+      type: "div",
+      style: "display: table-cell;"
     });
     cell.appendChild(elements[i]);
     row.appendChild(cell);
@@ -57,65 +58,81 @@ LoginDialog.prototype.createTableRow = function(elements) {
   return row;
 };
 
-LoginDialog.prototype._createLoginTab = function() {
+LoginDialog.prototype._createLoginTab = function () {
   var self = this;
 
   var authorizationFormTab = Functions.createElement({
-    type : "div",
-    style : "width:100%;display: table;border-spacing: 10px;"
+    type: "div",
+    style: "width:100%;display: table;border-spacing: 10px;"
   });
   this.getElement().appendChild(authorizationFormTab);
 
   var loginLabel = Functions.createElement({
-    type : "div",
-    content : "LOGIN:"
+    type: "div",
+    content: "LOGIN:"
   });
   var loginInput = Functions.createElement({
-    type : "input",
-    inputType : "text",
-    style : "width:100%",
-    name : "loginText"
+    type: "input",
+    inputType: "text",
+    style: "width:100%",
+    name: "loginText"
   });
   this.setControlElement(PanelControlElementType.USER_TAB_LOGIN_INPUT_TEXT, loginInput);
 
-  authorizationFormTab.appendChild(self.createTableRow([ loginLabel, loginInput ]));
+  authorizationFormTab.appendChild(self.createTableRow([loginLabel, loginInput]));
 
   var passwordLabel = Functions.createElement({
-    type : "div",
-    content : "PASSWORD:"
+    type: "div",
+    content: "PASSWORD:"
   });
   var passwordInput = Functions.createElement({
-    type : "input",
-    inputType : "password",
-    style : "width:100%",
-    name : "passwordText"
+    type: "input",
+    inputType: "password",
+    style: "width:100%",
+    name: "passwordText"
   });
   this.setControlElement(PanelControlElementType.USER_TAB_PASSOWRD_INPUT_TEXT, passwordInput);
 
-  authorizationFormTab.appendChild(self.createTableRow([ passwordLabel, passwordInput ]));
+  authorizationFormTab.appendChild(self.createTableRow([passwordLabel, passwordInput]));
 
   var centerTag = Functions.createElement({
-    type : "center"
+    type: "center"
   });
   this.getElement().appendChild(centerTag);
 
   var loginButton = Functions.createElement({
-    type : "button",
-    name : "loginButton",
-    content : "LOGIN"
+    type: "button",
+    name: "loginButton",
+    content: "LOGIN"
   });
   centerTag.appendChild(loginButton);
   this.setControlElement(PanelControlElementType.USER_TAB_LOGIN_BUTTON, loginButton);
+  this.getElement().appendChild(Functions.createElement({type: "br"}));
 
+  this.getElement().appendChild(Functions.createElement({
+    type: "a",
+    name: "requestAccount",
+    content: "Request an account",
+    href: "#",
+  }));
+
+};
+
+LoginDialog.prototype.init = function () {
+  var self = this;
+  return ServerConnector.getConfigurationParam(ConfigurationType.REQUEST_ACCOUNT_EMAIL).then(function (value) {
+    var link = $("[name=requestAccount]", self.getElement());
+    link.attr("href", "mailto:" + value + "?subject=MINERVA account request");
+  });
 };
 
-LoginDialog.prototype.open = function() {
+LoginDialog.prototype.open = function () {
   var self = this;
   $(self.getElement()).dialog('option', 'title', 'AUTHORIZATION FORM');
   $(self.getElement()).dialog("open");
 };
 
-LoginDialog.prototype.destroy = function() {
+LoginDialog.prototype.destroy = function () {
   $(this.getElement()).dialog("destroy");
 };
 
diff --git a/frontend-js/src/main/js/gui/leftPanel/LeftPanel.js b/frontend-js/src/main/js/gui/leftPanel/LeftPanel.js
index fe553ab1f70c2fad8f51b4989e9e637f37b62b97..a8ae7a7e411f49c94e0851a80e900bb60f441590 100644
--- a/frontend-js/src/main/js/gui/leftPanel/LeftPanel.js
+++ b/frontend-js/src/main/js/gui/leftPanel/LeftPanel.js
@@ -151,6 +151,7 @@ LeftPanel.prototype.init = function() {
     resolve();
   });
   promises.push(initEvents);
+  promises.push(self.getLoginDialog().init());
   return Promise.all(promises);
 };
 
@@ -185,7 +186,8 @@ LeftPanel.prototype.showElementDetails = function(element) {
   if (element !== undefined && (openTabName.indexOf("SEARCH") === -1 || searchTabName !== "GENERIC")) {
     var model = self.getMap().getSubmapById(element.getModelId()).getModel();
     return model.getByIdentifiedElement(element, true).then(function(bioEntity) {
-      div.innerHTML = self.prepareElementDetailsContent(bioEntity).innerHTML;
+      div.innerHTML ="";
+      div.appendChild(self.prepareElementDetailsContent(bioEntity));
       $(div).dialog("open");
       $(div).dialog("option", "title", self.getElementTitle(bioEntity));
       $(div).scrollTop(0);
diff --git a/frontend-js/src/main/js/gui/leftPanel/MiRnaPanel.js b/frontend-js/src/main/js/gui/leftPanel/MiRnaPanel.js
index 4cc29424ce41f56ce2d4e8af922f71db85bb63e3..f3ea0d84c5c4e6ddddbc5a6382e0463a2d72754e 100644
--- a/frontend-js/src/main/js/gui/leftPanel/MiRnaPanel.js
+++ b/frontend-js/src/main/js/gui/leftPanel/MiRnaPanel.js
@@ -27,7 +27,7 @@ MiRnaPanel.prototype.createPreamble = function(miRna) {
     result.appendChild(guiUtils.createLabel("NOT FOUND"));
   } else {
     var line = document.createElement("div");
-    line.appendChild(guiUtils.createLabel("&mu;Rna: "));
+    line.appendChild(guiUtils.createLabel("MiRNA: "));
     line.appendChild(guiUtils.createLink("http://www.mirbase.org/cgi-bin/mirna_entry.pl?acc=" + miRna.getName(), miRna
         .getName()));
     line.appendChild(guiUtils.createNewLine());
diff --git a/frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js b/frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
index 750b0204fbffab3b17c7259789963e037479ce4f..855cfaf57098be11362c6b25bdce273ca7284d77 100644
--- a/frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
+++ b/frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
@@ -16,8 +16,8 @@ function OverlayPanel(params) {
   params.panelName = "overlays";
   params.scrollable = true;
   params.helpTip = "<p>Overlays tab allows to display or generate custom coloring of elements and interactions in the map.</p>"
-      + "<p>General overlays are overlays accessible for every user viewing the content.</p>"
-      + "<p>Custom overlays are user-provided overlays, this menu becomes available upon login (see below).</p>";
+    + "<p>General overlays are overlays accessible for every user viewing the content.</p>"
+    + "<p>Custom overlays are user-provided overlays, this menu becomes available upon login (see below).</p>";
   Panel.call(this, params);
 
   var self = this;
@@ -26,7 +26,7 @@ function OverlayPanel(params) {
 
   var addButton = this.getControlElement(PanelControlElementType.OVERLAY_ADD_OVERLAY_BUTTON);
 
-  addButton.onclick = function() {
+  addButton.onclick = function () {
     self.openAddOverlayDialog();
   };
 
@@ -38,70 +38,70 @@ function OverlayPanel(params) {
 OverlayPanel.prototype = Object.create(Panel.prototype);
 OverlayPanel.prototype.constructor = OverlayPanel;
 
-OverlayPanel.prototype._createOverlayPanelGui = function() {
+OverlayPanel.prototype._createOverlayPanelGui = function () {
   var generalOverlaysDiv = Functions.createElement({
-    type : "div",
-    name : "generalOverlays",
-    className : "searchPanel"
+    type: "div",
+    name: "generalOverlays",
+    className: "searchPanel"
   });
   this.getElement().appendChild(generalOverlaysDiv);
   this.setControlElement(PanelControlElementType.OVERLAY_GENERAL_OVERLAY_DIV, generalOverlaysDiv);
 
   var generalOverlaysTitle = Functions.createElement({
-    type : "h5",
-    content : "GENERAL OVERLAYS:"
+    type: "h5",
+    content: "GENERAL OVERLAYS:"
   });
   generalOverlaysDiv.appendChild(generalOverlaysTitle);
 
   var generalOverlaysTableDiv = Functions.createElement({
-    type : "table",
-    name : "generalOverlaysTab",
-    className : "table table-bordered",
-    style : "width:100%"
+    type: "table",
+    name: "generalOverlaysTab",
+    className: "table table-bordered",
+    style: "width:100%"
   });
   generalOverlaysDiv.appendChild(generalOverlaysTableDiv);
   this.setControlElement(PanelControlElementType.OVERLAY_GENERAL_OVERLAY_TABLE, generalOverlaysTableDiv);
 
   var customOverlaysDiv = Functions.createElement({
-    type : "div",
-    name : "customOverlays",
-    className : "searchPanel"
+    type: "div",
+    name: "customOverlays",
+    className: "searchPanel"
   });
   this.getElement().appendChild(customOverlaysDiv);
   this.setControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_DIV, customOverlaysDiv);
 
   var customOverlaysTitle = Functions.createElement({
-    type : "h5",
-    name : "customOverlaysTitle",
-    content : "USER-PROVIDED OVERLAYS:"
+    type: "h5",
+    name: "customOverlaysTitle",
+    content: "USER-PROVIDED OVERLAYS:"
   });
   customOverlaysDiv.appendChild(customOverlaysTitle);
   this.setControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TITLE, customOverlaysTitle);
 
   var customOverlaysTableDiv = Functions.createElement({
-    type : "table",
-    name : "customOverlaysTab",
-    className : "table table-bordered",
-    style : "width:100%"
+    type: "table",
+    name: "customOverlaysTab",
+    className: "table table-bordered",
+    style: "width:100%"
   });
   customOverlaysDiv.appendChild(customOverlaysTableDiv);
   this.setControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TABLE, customOverlaysTableDiv);
 
   var centerTag = Functions.createElement({
-    type : "center"
+    type: "center"
   });
   customOverlaysDiv.appendChild(centerTag);
 
   var addOverlayButton = Functions.createElement({
-    type : "button",
-    name : "addOverlay",
-    content : "Add overlay"
+    type: "button",
+    name: "addOverlay",
+    content: "Add overlay"
   });
   centerTag.appendChild(addOverlayButton);
   this.setControlElement(PanelControlElementType.OVERLAY_ADD_OVERLAY_BUTTON, addOverlayButton);
 };
 
-OverlayPanel.prototype.clear = function() {
+OverlayPanel.prototype.clear = function () {
   var table = this.getControlElement(PanelControlElementType.OVERLAY_GENERAL_OVERLAY_TABLE);
   while (table.firstChild) {
     table.removeChild(table.firstChild);
@@ -114,7 +114,7 @@ OverlayPanel.prototype.clear = function() {
 
 };
 
-OverlayPanel.prototype.createTableHeader = function(edit) {
+OverlayPanel.prototype.createTableHeader = function (edit) {
   var result = document.createElement("thead");
 
   var row = document.createElement("tr");
@@ -141,7 +141,7 @@ OverlayPanel.prototype.createTableHeader = function(edit) {
   return result;
 };
 
-OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
+OverlayPanel.prototype.createOverlayRow = function (overlay, checked) {
   var self = this;
   var guiUtils = self.getGuiUtils();
   var result = document.createElement("tr");
@@ -159,7 +159,7 @@ OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
     var checkbox = document.createElement("input");
     checkbox.type = "checkbox";
     checkbox.checked = checked;
-    checkbox.onclick = function() {
+    checkbox.onclick = function () {
       if (this.checked) {
         return self.getMap().openDataOverlay(overlay.getId()).then(null, GuiConnector.alert);
       } else {
@@ -171,7 +171,7 @@ OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
     var img = guiUtils.createIcon("icons/search.png");
     var link = document.createElement("a");
     link.href = "#";
-    link.onclick = function() {
+    link.onclick = function () {
       self.getMap().openDataOverlay(overlay.getId());
       $(result).addClass('active').siblings().removeClass('active');
     };
@@ -184,10 +184,10 @@ OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
   if (overlay.getInputDataAvailable()) {
     var button = document.createElement("button");
     button.setAttribute("name", "download-overlay-" + overlay.getId());
-    button.onclick = function() {
+    button.onclick = function () {
       return ServerConnector.getOverlaySourceDownloadUrl({
-        overlayId : overlay.getId()
-      }).then(function(url) {
+        overlayId: overlay.getId()
+      }).then(function (url) {
         return self.downloadFile(url);
       }).then(null, GuiConnector.alert);
     };
@@ -201,7 +201,7 @@ OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
     var editTd = document.createElement("td");
     var editButton = document.createElement("button");
     editButton.setAttribute("name", "editButton");
-    editButton.onclick = function() {
+    editButton.onclick = function () {
       self.openEditOverlayDialog(overlay);
     };
     editButton.innerHTML = "<span class='ui-icon ui-icon-document'></span>";
@@ -212,147 +212,147 @@ OverlayPanel.prototype.createOverlayRow = function(overlay, checked) {
   return result;
 };
 
-OverlayPanel.prototype.openEditOverlayDialog = function(overlay) {
+OverlayPanel.prototype.openEditOverlayDialog = function (overlay) {
   var self = this;
   var guiUtils = self.getGuiUtils();
   var content = document.createElement("fieldset");
   var nameInput = guiUtils.createInputText(overlay.getName());
-  var row = guiUtils.createTableRow([ guiUtils.createLabel("Name: "), nameInput ]);
+  var row = guiUtils.createTableRow([guiUtils.createLabel("Name: "), nameInput]);
   content.appendChild(row);
 
   var descriptionInput = guiUtils.createTextArea(overlay.getDescription());
-  row = guiUtils.createTableRow([ guiUtils.createLabel("Description: "), descriptionInput ]);
+  row = guiUtils.createTableRow([guiUtils.createLabel("Description: "), descriptionInput]);
   content.appendChild(row);
 
-  var buttons = [ {
-    text : "SAVE",
-    click : function() {
+  var buttons = [{
+    text: "SAVE",
+    click: function () {
       var windowSelf = this;
       return ServerConnector.updateOverlay({
-        overlayId : overlay.id,
-        name : nameInput.value,
-        description : descriptionInput.value
-      }).then(function() {
+        overlayId: overlay.id,
+        name: nameInput.value,
+        description: descriptionInput.value
+      }).then(function () {
         return self.refresh();
-      }).then(function() {
+      }).then(function () {
         $(windowSelf).dialog("close");
       }).then(null, GuiConnector.alert);
     }
   }, {
-    text : "REMOVE",
-    click : function() {
+    text: "REMOVE",
+    click: function () {
       self.getMap().removeSelectedLayout(overlay.getId());
 
       var windowSelf = this;
       return ServerConnector.removeOverlay({
-        overlayId : overlay.getId()
-      }).then(function() {
+        overlayId: overlay.getId()
+      }).then(function () {
         return self.refresh();
-      }).then(function() {
+      }).then(function () {
         $(windowSelf).dialog("close");
       }).then(null, GuiConnector.alert);
     }
   }, {
-    text : "CANCEL",
-    click : function() {
+    text: "CANCEL",
+    click: function () {
       $(this).dialog("close");
     }
-  } ];
+  }];
   self.openDialog(content, {
-    id : overlay.getId(),
-    buttons : buttons,
-    title : "Data overlay: " + overlay.getName(),
-    className : "minerva-overlay-dialog",
+    id: overlay.getId(),
+    buttons: buttons,
+    title: "Data overlay: " + overlay.getName(),
+    className: "minerva-overlay-dialog",
   });
 };
 
-OverlayPanel.prototype.refresh = function() {
+OverlayPanel.prototype.refresh = function () {
   var self = this;
   var user = null;
 
   var overlayTypes = [];
   var selectedOverlay = [];
 
-  return ServerConnector.getOverlayTypes().then(function(types) {
+  return ServerConnector.getOverlayTypes().then(function (types) {
     overlayTypes = types;
     return ServerConnector.getLoggedUser();
-  }).then(function(loggedUser) {
+  }).then(function (loggedUser) {
     user = loggedUser;
     return self.getMap().getVisibleDataOverlays();
-  }).then(function(visibleDataOverlays) {
+  }).then(function (visibleDataOverlays) {
     for (var j = 0; j < visibleDataOverlays.length; j++) {
       selectedOverlay[visibleDataOverlays[j].getId()] = true;
     }
 
     return ServerConnector.getOverlays();
   }).then(
-      function(customOverlays) {
+    function (customOverlays) {
 
-        var id = self.getMap().getGoogleMap().getMapTypeId().substring(2);
-        selectedOverlay[id] = true;
+      var id = self.getMap().getGoogleMap().getMapTypeId().substring(2);
+      selectedOverlay[id] = true;
 
-        self.clear();
+      self.clear();
 
-        var generalOverlays = [];
-        var overlay;
+      var generalOverlays = [];
+      var overlay;
 
-        var overlays = self.getMap().getLayouts();
-        for (var i = 0; i < overlays.length; i++) {
-          overlay = overlays[i];
-          if (overlay.getCreator() === undefined || overlay.getCreator() === "") {
-            generalOverlays.push(overlay);
-          }
+      var overlays = self.getMap().getLayouts();
+      for (var i = 0; i < overlays.length; i++) {
+        overlay = overlays[i];
+        if (overlay.getCreator() === undefined || overlay.getCreator() === "") {
+          generalOverlays.push(overlay);
         }
+      }
 
-        var table = self.getControlElement(PanelControlElementType.OVERLAY_GENERAL_OVERLAY_TABLE);
-        table.appendChild(self.createTableHeader());
+      var table = self.getControlElement(PanelControlElementType.OVERLAY_GENERAL_OVERLAY_TABLE);
+      table.appendChild(self.createTableHeader());
 
-        var body = document.createElement("tbody");
-        table.appendChild(body);
-        for (i = 0; i < generalOverlays.length; i++) {
-          overlay = generalOverlays[i];
-          body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()]));
-        }
+      var body = document.createElement("tbody");
+      table.appendChild(body);
+      for (i = 0; i < generalOverlays.length; i++) {
+        overlay = generalOverlays[i];
+        body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()]));
+      }
 
-        var title = self.getControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TITLE);
-        var addButton = self.getControlElement(PanelControlElementType.OVERLAY_ADD_OVERLAY_BUTTON);
-        if (user.getLogin() === "anonymous") {
-          title.innerHTML = 'YOU ARE NOT LOGGED IN. PLEASE, <a href="#">LOG IN</a>'
-              + 'TO UPLOAD AND VIEW CUSTOM OVERLAYS<br/><center><button>LOGIN</button></center>';
-          var openLoginDialog = function() {
-            return self.getParent().getLoginDialog().open();
-          };
-          $(title).find("a")[0].onclick = openLoginDialog;
-          $(title).find("button")[0].onclick = openLoginDialog;
-          addButton.style.display = "none";
-        } else {
-          title.innerHTML = self.getCustomOverlaysMessage();
-          addButton.style.display = "block";
+      var title = self.getControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TITLE);
+      var addButton = self.getControlElement(PanelControlElementType.OVERLAY_ADD_OVERLAY_BUTTON);
+      if (user.getLogin() === "anonymous") {
+        title.innerHTML = 'YOU ARE NOT LOGGED IN. PLEASE, <a href="#">LOG IN</a>'
+          + 'TO UPLOAD AND VIEW CUSTOM OVERLAYS<br/><center><button>LOGIN</button></center>';
+        var openLoginDialog = function () {
+          return self.getParent().getLoginDialog().open();
+        };
+        $(title).find("a")[0].onclick = openLoginDialog;
+        $(title).find("button")[0].onclick = openLoginDialog;
+        addButton.style.display = "none";
+      } else {
+        title.innerHTML = self.getCustomOverlaysMessage();
+        addButton.style.display = "block";
 
-          table = self.getControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TABLE);
-          table.appendChild(self.createTableHeader(true));
+        table = self.getControlElement(PanelControlElementType.OVERLAY_CUSTOM_OVERLAY_TABLE);
+        table.appendChild(self.createTableHeader(true));
 
-          body = document.createElement("tbody");
-          table.appendChild(body);
-          for (i = 0; i < customOverlays.length; i++) {
-            overlay = customOverlays[i];
-            body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()]));
-          }
+        body = document.createElement("tbody");
+        table.appendChild(body);
+        for (i = 0; i < customOverlays.length; i++) {
+          overlay = customOverlays[i];
+          body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()]));
         }
+      }
 
-        self.onresize();
-      });
+      self.onresize();
+    });
 };
 
-OverlayPanel.prototype.setCustomOverlaysMessage = function(customOverlaysMessage) {
+OverlayPanel.prototype.setCustomOverlaysMessage = function (customOverlaysMessage) {
   this._customOverlaysMessage = customOverlaysMessage;
 };
 
-OverlayPanel.prototype.getCustomOverlaysMessage = function() {
+OverlayPanel.prototype.getCustomOverlaysMessage = function () {
   return this._customOverlaysMessage;
 };
 
-OverlayPanel.prototype.parseFile = function(fileContent) {
+OverlayPanel.prototype.parseFile = function (fileContent) {
   var result = {};
   var lines = fileContent.split("\n");
   for (var i = 0; i < lines.length; i++) {
@@ -378,7 +378,7 @@ OverlayPanel.prototype.parseFile = function(fileContent) {
   return result;
 };
 
-OverlayPanel.prototype.openAddOverlayDialog = function() {
+OverlayPanel.prototype.openAddOverlayDialog = function () {
   var self = this;
   var guiUtils = self.getGuiUtils();
   var fileContent = null;
@@ -399,13 +399,13 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
 
   content.appendChild(guiUtils.createLabel("Upload file: "));
   var fileInput = guiUtils.createFileButton();
-  fileInput.addEventListener("change", function() {
+  fileInput.addEventListener("change", function () {
     fileContent = null;
     var file = fileInput.files[0];
     if (file) {
       var reader = new FileReader();
       reader.readAsText(file, "UTF-8");
-      reader.onload = function(evt) {
+      reader.onload = function (evt) {
         fileContent = evt.target.result;
         var data = self.parseFile(fileContent);
         if (data.name !== undefined) {
@@ -413,7 +413,10 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
         } else {
           var filename = fileInput.value;
           if (filename.indexOf(".") > 0) {
-            filename.substr(0, filename.indexOf(".") - 1);
+            filename = filename.substr(0, filename.indexOf("."));
+          }
+          if (filename.lastIndexOf("\\") >= 0) {
+            filename = filename.substr(filename.lastIndexOf("\\") + 1);
           }
           nameInput.value = filename;
         }
@@ -421,7 +424,7 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
           descriptionInput.value = data.description;
         }
       };
-      reader.onerror = function() {
+      reader.onerror = function () {
         GuiConnector.alert("Problem reading file");
       };
     }
@@ -435,9 +438,9 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
   content.appendChild(contentInput);
   content.appendChild(guiUtils.createNewLine());
 
-  var buttons = [ {
-    text : "UPLOAD",
-    click : function() {
+  var buttons = [{
+    text: "UPLOAD",
+    click: function () {
       var dialog = this;
       if (contentInput.value !== undefined && contentInput.value !== null) {
         contentInput.value = contentInput.value.trim();
@@ -449,19 +452,19 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
         GuiConnector.alert("Neither file was selected nor data was enterd");
       } else {
         var data = {
-          name : nameInput.value,
-          description : descriptionInput.value,
-          content : fileContent,
-          filename : fileInput.value
+          name: nameInput.value,
+          description: descriptionInput.value,
+          content: fileContent,
+          filename: fileInput.value
         };
         GuiConnector.showProcessing();
-        return ServerConnector.addOverlay(data).then(function(overlay) {
+        return ServerConnector.addOverlay(data).then(function (overlay) {
           self.getMap().getModel().addLayout(overlay);
           return self.refresh();
-        }).then(function() {
+        }).then(function () {
           GuiConnector.hideProcessing();
           $(dialog).dialog("close");
-        }, function(error) {
+        }, function (error) {
           GuiConnector.hideProcessing();
           if (error instanceof NetworkError) {
             if (error.statusCode === HttpStatus.BAD_REQUEST) {
@@ -477,19 +480,19 @@ OverlayPanel.prototype.openAddOverlayDialog = function() {
       }
     }
   }, {
-    text : "CANCEL",
-    click : function() {
+    text: "CANCEL",
+    click: function () {
       $(this).dialog("close");
     }
-  } ];
+  }];
   self.openDialog(content, {
-    id : "addOverlay",
-    modal : true,
-    buttons : buttons,
+    id: "addOverlay",
+    modal: true,
+    buttons: buttons,
   });
 };
 
-OverlayPanel.prototype.init = function() {
+OverlayPanel.prototype.init = function () {
   return this.refresh();
 };
 module.exports = OverlayPanel;
diff --git a/frontend-js/src/main/js/map/AbstractCustomMap.js b/frontend-js/src/main/js/map/AbstractCustomMap.js
index 10cc77ed9362755a3ff84256833118259b58f1df..6d10e69789c5f0031be91544541883e657ebb8c4 100644
--- a/frontend-js/src/main/js/map/AbstractCustomMap.js
+++ b/frontend-js/src/main/js/map/AbstractCustomMap.js
@@ -79,9 +79,9 @@ AbstractCustomMap.prototype.constructor = AbstractCustomMap;
 /**
  * Assigns layouts with images to the google map (which set of images should be
  * used by google maps api for which layout).
- * 
+ *
  */
-AbstractCustomMap.prototype.setupLayouts = function() {
+AbstractCustomMap.prototype.setupLayouts = function () {
   for (var i = 0; i < this.getLayouts().length; i++) {
     var layout = this.getLayouts()[i];
     var typeOptions = this.createTypeOptions(layout);
@@ -93,9 +93,9 @@ AbstractCustomMap.prototype.setupLayouts = function() {
 
 /**
  * Creates general google maps options used in this map.
- * 
+ *
  */
-AbstractCustomMap.prototype.creatMapOptions = function() {
+AbstractCustomMap.prototype.creatMapOptions = function () {
   var self = this;
 
   var centerPoint = this.getModel().getCenterLatLng();
@@ -107,19 +107,19 @@ AbstractCustomMap.prototype.creatMapOptions = function() {
   }
 
   var result = {
-    center : centerPoint,
-    rotateControl : true,
-    panControl : true,
-    mapTypeControl : false,
-    zoom : this.getMinZoom(),
-    streetViewControl : false,
-
-    panControlOptions : {
-      position : google.maps.ControlPosition.LEFT_TOP
+    center: centerPoint,
+    rotateControl: true,
+    panControl: true,
+    mapTypeControl: false,
+    zoom: this.getMinZoom(),
+    streetViewControl: false,
+
+    panControlOptions: {
+      position: google.maps.ControlPosition.LEFT_TOP
     },
-    zoomControlOptions : {
-      style : google.maps.ZoomControlStyle.LARGE,
-      position : google.maps.ControlPosition.LEFT_TOP
+    zoomControlOptions: {
+      style: google.maps.ZoomControlStyle.LARGE,
+      position: google.maps.ControlPosition.LEFT_TOP
     }
 
   };
@@ -128,16 +128,16 @@ AbstractCustomMap.prototype.creatMapOptions = function() {
 
 /**
  * Create google maps configuration options object for a specific layout.
- * 
+ *
  * @param param
  *          object with information about layout
  */
-AbstractCustomMap.prototype.createTypeOptions = function(param) {
+AbstractCustomMap.prototype.createTypeOptions = function (param) {
   var self = this;
   var result = {
     // this is a function that will retrieve valid url to png images for
     // tiles on different zoom levels
-    getTileUrl : function(coord, zoom) {
+    getTileUrl: function (coord, zoom) {
       // we have 1 tile on self.getConfiguration().MIN_ZOOM and
       // therefore must limit tails according to this
       /* jshint bitwise: false */
@@ -148,28 +148,28 @@ AbstractCustomMap.prototype.createTypeOptions = function(param) {
       var addr = "../map_images/" + param.getDirectory() + "/" + zoom + "/" + coord.x + "/" + coord.y + ".PNG";
       return addr;
     },
-    tileSize : new google.maps.Size(this.getTileSize(), this.getTileSize()),
-    maxZoom : this.getMaxZoom(),
-    minZoom : this.getMinZoom(),
-    radius : 360,
-    name : param.name
+    tileSize: new google.maps.Size(this.getTileSize(), this.getTileSize()),
+    maxZoom: this.getMaxZoom(),
+    minZoom: this.getMinZoom(),
+    radius: 360,
+    name: param.name
   };
   return result;
 };
 
 /**
  * Sets maximum zoom level on google map.
- * 
+ *
  */
-AbstractCustomMap.prototype.setMaxZoomLevel = function() {
+AbstractCustomMap.prototype.setMaxZoomLevel = function () {
   this.getGoogleMap().setZoom(this.getMaxZoom());
 };
 
 /**
  * Returns mouse coordinate on the map in lat,lng system.
- * 
+ *
  */
-AbstractCustomMap.prototype.getMouseLatLng = function() {
+AbstractCustomMap.prototype.getMouseLatLng = function () {
   // this method is tricky, the main problem is how to map mouse coordinate to
   // google map
   // to do that we need a point of reference in both systems (x,y and lat,lng)
@@ -190,19 +190,19 @@ AbstractCustomMap.prototype.getMouseLatLng = function() {
   }
 
   var offset = {
-    x : lx,
-    y : ly
+    x: lx,
+    y: ly
   };
 
   var center = {
-    x : self.getGoogleMap().getDiv().offsetWidth / 2,
-    y : self.getGoogleMap().getDiv().offsetHeight / 2
+    x: self.getGoogleMap().getDiv().offsetWidth / 2,
+    y: self.getGoogleMap().getDiv().offsetHeight / 2
   };
 
   // and now find how far from center point we are (in pixels)
   var relativeDist = {
-    x : (GuiConnector.xPos - offset.x - center.x),
-    y : (GuiConnector.yPos - offset.y - center.y)
+    x: (GuiConnector.xPos - offset.x - center.x),
+    y: (GuiConnector.yPos - offset.y - center.y)
   };
 
   // transform pixels into x,y distance
@@ -220,14 +220,14 @@ AbstractCustomMap.prototype.getMouseLatLng = function() {
 
 /**
  * Transform distance (coordinates) in pixels into x,y distance on the map.
- * 
+ *
  * @param pixels
  *          x,y distance in pixels
  * @param zoomLevel
  *          at which zoom level this pixels where mesaured
- * 
+ *
  */
-AbstractCustomMap.prototype.fromPixelsToPoint = function(pixels, zoomLevel) {
+AbstractCustomMap.prototype.fromPixelsToPoint = function (pixels, zoomLevel) {
   var zoomScale = this.getPictureSize() / (Math.pow(2, zoomLevel - this.getMinZoom()) * this.getTileSize());
   var pointx = pixels.x * zoomScale;
   var pointy = pixels.y * zoomScale;
@@ -237,13 +237,13 @@ AbstractCustomMap.prototype.fromPixelsToPoint = function(pixels, zoomLevel) {
 /**
  * Transforms coordinates on the map from google.maps.LatLng to
  * google.maps.Point
- * 
+ *
  * @param latlng
  *          cooordinates in x,y format
  * @param coordinates
  *          in lat,lng format
  */
-AbstractCustomMap.prototype.fromLatLngToPoint = function(latLng) {
+AbstractCustomMap.prototype.fromLatLngToPoint = function (latLng) {
   var me = this;
   var point = new google.maps.Point(0, 0);
   var origin = me.pixelOrigin_;
@@ -265,12 +265,12 @@ AbstractCustomMap.prototype.fromLatLngToPoint = function(latLng) {
 /**
  * Transforms coordinates on the map from google.maps.Point to
  * google.maps.LatLng
- * 
+ *
  * @param point
  *          coordinates in standard x,y format
  * @return cooordinates in lat,lng format
  */
-AbstractCustomMap.prototype.fromPointToLatLng = function(point) {
+AbstractCustomMap.prototype.fromPointToLatLng = function (point) {
   var me = this;
 
   // rescale the point (all computations are done assuming that we work on
@@ -286,26 +286,26 @@ AbstractCustomMap.prototype.fromPointToLatLng = function(point) {
 /**
  * Transforms google.maps.LatLng to tile coordinate (for instance on which tile
  * mouse clicked).
- * 
- * 
+ *
+ *
  * @param latlng
  *          coordinates in latlng format
  * @param z
  *          zoom level at which we want to find coordinates of tile
  * @return cooordinates of a tile
  */
-AbstractCustomMap.prototype.latLngToTile = function(latLng, z) {
+AbstractCustomMap.prototype.latLngToTile = function (latLng, z) {
   var worldCoordinate = this.fromLatLngToPoint(latLng);
   var pixelCoordinate = new google.maps.Point(worldCoordinate.x * Math.pow(2, z), worldCoordinate.y * Math.pow(2, z));
   var tileCoordinate = new google.maps.Point(Math.floor(pixelCoordinate.x / this.getTileSize()), Math
-      .floor(pixelCoordinate.y / this.getTileSize()));
+    .floor(pixelCoordinate.y / this.getTileSize()));
   return tileCoordinate;
 };
 
 /**
  * Register events responsible for click events
  */
-AbstractCustomMap.prototype.registerMapClickEvents = function() {
+AbstractCustomMap.prototype.registerMapClickEvents = function () {
 
   // find top map (CustomMap)
   //
@@ -314,30 +314,30 @@ AbstractCustomMap.prototype.registerMapClickEvents = function() {
   var self = this;
 
   // search event
-  google.maps.event.addListener(this.getGoogleMap(), 'click', function(mouseEvent) {
+  google.maps.event.addListener(this.getGoogleMap(), 'click', function (mouseEvent) {
     var point = self.fromLatLngToPoint(mouseEvent.latLng);
     var searchDb = customMap.getOverlayByName('search');
     return searchDb.searchByCoordinates({
-      modelId : self.getModel().getId(),
-      coordinates : point,
-      zoom : self.getGoogleMap().getZoom()
+      modelId: self.getModel().getId(),
+      coordinates: point,
+      zoom: self.getGoogleMap().getZoom()
     }).then(null, GuiConnector.alert);
   });
 
   // select last clicked map
-  google.maps.event.addListener(this.getGoogleMap(), 'click', function(mouseEvent) {
+  google.maps.event.addListener(this.getGoogleMap(), 'click', function (mouseEvent) {
     customMap.setActiveSubmapId(self.getId());
     customMap.setActiveSubmapClickCoordinates(self.fromLatLngToPoint(mouseEvent.latLng));
   });
 
   // select last clicked map
-  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function(mouseEvent) {
+  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function (mouseEvent) {
     customMap.setActiveSubmapId(self.getId());
     customMap.setActiveSubmapClickCoordinates(self.fromLatLngToPoint(mouseEvent.latLng));
   });
 
   // prepare for image export
-  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function() {
+  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function () {
     var bounds = self.getGoogleMap().getBounds();
     var polygon = "";
 
@@ -364,7 +364,7 @@ AbstractCustomMap.prototype.registerMapClickEvents = function() {
   });
 
   // context menu event
-  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function() {
+  google.maps.event.addListener(this.getGoogleMap(), 'rightclick', function () {
     self.getTopMap().getContextMenu().open(GuiConnector.xPos, GuiConnector.yPos);
   });
 };
@@ -372,9 +372,9 @@ AbstractCustomMap.prototype.registerMapClickEvents = function() {
 /**
  * It toggle drawing manager used on the map: if it's on then it will turn it
  * off, if it's off it will turn it on
- * 
+ *
  */
-AbstractCustomMap.prototype._turnOnOffDrawing = function() {
+AbstractCustomMap.prototype._turnOnOffDrawing = function () {
   if (this.isDrawingOn()) {
     this.turnOffDrawing();
   } else {
@@ -384,16 +384,16 @@ AbstractCustomMap.prototype._turnOnOffDrawing = function() {
 
 /**
  * Checks if the drawing manager for the map is on.
- * 
+ *
  */
-AbstractCustomMap.prototype.isDrawingOn = function() {
+AbstractCustomMap.prototype.isDrawingOn = function () {
   return this._drawingManager !== null;
 };
 
 /**
  * Turns on drawing manager on the map.
  */
-AbstractCustomMap.prototype.turnOnDrawing = function() {
+AbstractCustomMap.prototype.turnOnDrawing = function () {
   if (this.isDrawingOn()) {
     logger.warn("Trying to turn on drawing manager, but it is already available.");
     return;
@@ -401,28 +401,28 @@ AbstractCustomMap.prototype.turnOnDrawing = function() {
   var customMap = this.getTopMap();
   var self = this;
   this._drawingManager = new google.maps.drawing.DrawingManager({
-    drawingMode : google.maps.drawing.OverlayType.MARKER,
-    drawingControl : true,
-    drawingControlOptions : {
-      position : google.maps.ControlPosition.TOP_CENTER,
-      drawingModes : [ google.maps.drawing.OverlayType.POLYGON, ]
+    drawingMode: google.maps.drawing.OverlayType.MARKER,
+    drawingControl: true,
+    drawingControlOptions: {
+      position: google.maps.ControlPosition.TOP_CENTER,
+      drawingModes: [google.maps.drawing.OverlayType.POLYGON,]
     },
-    markerOptions : {
-      icon : 'images/beachflag.png'
+    markerOptions: {
+      icon: 'images/beachflag.png'
     },
-    circleOptions : {
-      fillColor : '#ffff00',
-      fillOpacity : 1,
-      strokeWeight : 5,
-      clickable : false,
-      editable : true,
-      zIndex : 1
+    circleOptions: {
+      fillColor: '#ffff00',
+      fillOpacity: 1,
+      strokeWeight: 5,
+      clickable: false,
+      editable: true,
+      zIndex: 1
     }
   });
   this._drawingManager.setMap(this.getGoogleMap());
   this._drawingManager.setDrawingMode(google.maps.drawing.OverlayType.POLYGON);
 
-  google.maps.event.addListener(this._drawingManager, 'overlaycomplete', function(e) {
+  google.maps.event.addListener(this._drawingManager, 'overlaycomplete', function (e) {
     if (e.type !== google.maps.drawing.OverlayType.MARKER) {
       // Switch back to non-drawing mode after drawing a shape.
       self._drawingManager.setDrawingMode(null);
@@ -431,7 +431,7 @@ AbstractCustomMap.prototype.turnOnDrawing = function() {
       // user mouses down on it.
       var newShape = e.overlay;
       newShape.type = e.type;
-      google.maps.event.addListener(newShape, 'rightclick', function(e) {
+      google.maps.event.addListener(newShape, 'rightclick', function (e) {
         // select map that was clicked
         customMap.setActiveSubmapId(self.getId());
 
@@ -449,25 +449,25 @@ AbstractCustomMap.prototype.turnOnDrawing = function() {
 
 /**
  * Sets selectedArea on this map.
- * 
+ *
  */
-AbstractCustomMap.prototype.setSelectedArea = function(area) {
+AbstractCustomMap.prototype.setSelectedArea = function (area) {
   this._selectedArea = area;
 };
 
 /**
  * Returns selectedArea on this map.
- * 
+ *
  */
-AbstractCustomMap.prototype.getSelectedArea = function() {
+AbstractCustomMap.prototype.getSelectedArea = function () {
   return this._selectedArea;
 };
 
 /**
  * Transforms google.maps.Polygon into string with coordinates.
- * 
+ *
  */
-AbstractCustomMap.prototype.areaToString = function(area) {
+AbstractCustomMap.prototype.areaToString = function (area) {
   var len = area.getPath().length;
   var path = area.getPath();
   var res = "";
@@ -481,7 +481,7 @@ AbstractCustomMap.prototype.areaToString = function(area) {
 /**
  * Removes selected area (polygon) from the map.
  */
-AbstractCustomMap.prototype._removeSelection = function() {
+AbstractCustomMap.prototype._removeSelection = function () {
   if (this._selectedArea) {
     this._selectedArea.setMap(null);
     this._selectedArea = null;
@@ -493,7 +493,7 @@ AbstractCustomMap.prototype._removeSelection = function() {
 /**
  * Turns off drawing manager on the map.
  */
-AbstractCustomMap.prototype.turnOffDrawing = function() {
+AbstractCustomMap.prototype.turnOffDrawing = function () {
   if (this.isDrawingOn()) {
     this._drawingManager.setMap(null);
     this._drawingManager = null;
@@ -506,10 +506,10 @@ AbstractCustomMap.prototype.turnOffDrawing = function() {
  * Returns top map. TODO implementation of this function should be probably
  * moved to Submap and CustomMap classes and here only abstract function
  * definition
- * 
+ *
  * @returns {CustomMap}
  */
-AbstractCustomMap.prototype.getTopMap = function() {
+AbstractCustomMap.prototype.getTopMap = function () {
   logger.fatal("Not implemented");
 };
 
@@ -519,7 +519,7 @@ AbstractCustomMap.prototype.getTopMap = function() {
  * visualized at the same time then index contains information where this new
  * layout is placed in the list (starting from 0) and length contains
  * information how many layouts we visualize in total.
- * 
+ *
  * @param layoutId
  *          identifier of a layout
  * @param index
@@ -529,9 +529,9 @@ AbstractCustomMap.prototype.getTopMap = function() {
  * @param length
  *          number of layouts that are currently visualized
  */
-AbstractCustomMap.prototype._resizeSelectedLayout = function(layoutId, index, length) {
+AbstractCustomMap.prototype._resizeSelectedLayout = function (layoutId, index, length) {
   var self = this;
-  return new Promise(function(resolve) {
+  return new Promise(function (resolve) {
     // if map is not initialized then don't perform this operation
     if (!self.initialized) {
       logger.debug("Model " + self.getId() + " not initialized");
@@ -555,7 +555,7 @@ AbstractCustomMap.prototype._resizeSelectedLayout = function(layoutId, index, le
  * the same time then index contains information where this new layout is placed
  * in the list (starting from 0) and length contains information how many
  * layouts we visualize in total.
- * 
+ *
  * @param layoutId
  *          identifier of a layout
  * @param index
@@ -565,10 +565,10 @@ AbstractCustomMap.prototype._resizeSelectedLayout = function(layoutId, index, le
  * @param length
  *          number of layouts that are currently visualized
  */
-AbstractCustomMap.prototype._showSelectedLayout = function(layoutId, index, length) {
+AbstractCustomMap.prototype._showSelectedLayout = function (layoutId, index, length) {
   var self = this;
   // if map is not initialized then don't perform this operation
-  return new Promise(function(resolve, reject) {
+  return new Promise(function (resolve, reject) {
     if (!self.initialized) {
       logger.debug("Model " + self.getId() + " not initialized");
       resolve();
@@ -587,49 +587,64 @@ AbstractCustomMap.prototype._showSelectedLayout = function(layoutId, index, leng
     var layoutAliases;
     var layoutReactions;
 
-    return self.getTopMap().getModel().getLayoutDataById(layoutId).then(function(layout) {
+    return self.getTopMap().getModel().getLayoutDataById(layoutId).then(function (layout) {
       layoutAliases = layout.getAliases();
       layoutReactions = layout.getReactions();
 
-      return Promise.each(layoutAliases, function(layoutAlias) {
+      var identifiedElements = [];
+      var i;
+      for (i = 0; i < layoutAliases.length; i++) {
+        if (layoutAliases[i].getModelId() === self.getId()) {
+          identifiedElements.push(new IdentifiedElement(layoutAliases[i]));
+        }
+      }
+      var reactionIds = [];
+      for (i = 0; i < layoutReactions.length; i++) {
+        if (layoutReactions[i].getModelId() === self.getId()) {
+          identifiedElements.push(new IdentifiedElement(layoutReactions[i]));
+        }
+      }
+      return self.getModel().getByIdentifiedElements(identifiedElements, false);
+    }).then(function () {
+      return Promise.each(layoutAliases, function (layoutAlias) {
         if (layoutAlias.getModelId() === self.getId()) {
           var surface;
           var element;
-          return self.getModel().getAliasById(layoutAlias.getId()).then(function(aliasData) {
+          return self.getModel().getAliasById(layoutAlias.getId()).then(function (aliasData) {
             element = new IdentifiedElement(aliasData);
             return AliasSurface.create({
-              overlayAlias : layoutAlias,
-              alias : aliasData,
-              map : self,
-              startX : startX,
-              endX : endX,
-              onClick : [ function() {
+              overlayAlias: layoutAlias,
+              alias: aliasData,
+              map: self,
+              startX: startX,
+              endX: endX,
+              onClick: [function () {
                 return self._openInfoWindowForAlias(aliasData, surface.getGoogleMarker());
-              }, function() {
+              }, function () {
                 return self.getTopMap().callListeners("onBioEntityClick", element);
-              } ]
+              }]
             });
-          }).then(function(result) {
+          }).then(function (result) {
             surface = result;
             self.selectedLayoutOverlays[layoutId].push(surface);
           });
         }
       });
-    }).then(function() {
-      return Promise.each(layoutReactions, function(layoutReaction) {
+    }).then(function () {
+      return Promise.each(layoutReactions, function (layoutReaction) {
         if (layoutReaction.getModelId() === self.getId()) {
-          return self.getModel().getReactionById(layoutReaction.getId()).then(function(reactionData) {
+          return self.getModel().getReactionById(layoutReaction.getId()).then(function (reactionData) {
             var element = new IdentifiedElement(reactionData);
             var surface = new ReactionSurface({
-              layoutReaction : layoutReaction,
-              reaction : reactionData,
-              map : self,
-              onClick : [ function() {
+              layoutReaction: layoutReaction,
+              reaction: reactionData,
+              map: self,
+              onClick: [function () {
                 return self._openInfoWindowForReaction(reactionData, surface.getGoogleMarker());
-              }, function() {
+              }, function () {
                 return self.getTopMap().callListeners("onBioEntityClick", element);
-              } ],
-              customized : (length === 1)
+              }],
+              customized: (length === 1)
             });
 
             self.selectedLayoutOverlays[layoutId].push(surface);
@@ -637,7 +652,7 @@ AbstractCustomMap.prototype._showSelectedLayout = function(layoutId, index, leng
           });
         }
       });
-    }).then(function() {
+    }).then(function () {
       resolve();
     }).then(null, reject);
   });
@@ -645,11 +660,11 @@ AbstractCustomMap.prototype._showSelectedLayout = function(layoutId, index, leng
 
 /**
  * Hides all elements from layout.
- * 
+ *
  * @param layoutId
  *          identifier of a layout
  */
-AbstractCustomMap.prototype._hideSelectedLayout = function(layoutId) {
+AbstractCustomMap.prototype._hideSelectedLayout = function (layoutId) {
   // if map is not initialized then don't perform this operation
   if (!this.initialized) {
     logger.debug("Model " + this.getId() + " not initialized");
@@ -663,11 +678,11 @@ AbstractCustomMap.prototype._hideSelectedLayout = function(layoutId) {
 
 /**
  * Opens {@link AliasInfoWindow} for given alias.
- * 
+ *
  * @param aliasId
  *          identifier of the alias
  */
-AbstractCustomMap.prototype._openInfoWindowForAlias = function(alias, googleMarker) {
+AbstractCustomMap.prototype._openInfoWindowForAlias = function (alias, googleMarker) {
   var self = this;
 
   var infoWindow = this.getAliasInfoWindowById(alias.getId());
@@ -680,9 +695,9 @@ AbstractCustomMap.prototype._openInfoWindowForAlias = function(alias, googleMark
     return Promise.resolve(infoWindow);
   } else {
     self._aliasInfoWindow[alias.getId()] = new AliasInfoWindow({
-      alias : alias,
-      map : self,
-      marker : googleMarker,
+      alias: alias,
+      map: self,
+      marker: googleMarker,
     });
     return self._aliasInfoWindow[alias.getId()].init();
   }
@@ -691,15 +706,15 @@ AbstractCustomMap.prototype._openInfoWindowForAlias = function(alias, googleMark
 /**
  * Returns promise of a list of {@link LayoutAlias} information for a given
  * {@link Alias} in all currently visualized layouts.
- * 
+ *
  * @param aliasId
  *          identifier of the {@link Alias}
  * @returns promise of an {Array} with list of {@link LayoutAlias} information
  *          for a given {@link Alias} in all currently visualized layouts
  */
-AbstractCustomMap.prototype.getAliasVisibleLayoutsData = function(aliasId) {
+AbstractCustomMap.prototype.getAliasVisibleLayoutsData = function (aliasId) {
   var self = this;
-  return self.getTopMap().getVisibleDataOverlays().then(function(visibleDataOverlays) {
+  return self.getTopMap().getVisibleDataOverlays().then(function (visibleDataOverlays) {
     var result = [];
     for (var i = 0; i < visibleDataOverlays.length; i++) {
       var layout = visibleDataOverlays[i];
@@ -712,16 +727,16 @@ AbstractCustomMap.prototype.getAliasVisibleLayoutsData = function(aliasId) {
 /**
  * Refresh content of all {@link AliasInfoWindow} in this map.
  */
-AbstractCustomMap.prototype._refreshInfoWindows = function() {
+AbstractCustomMap.prototype._refreshInfoWindows = function () {
   var promises = [];
-  for ( var key in this._pointInfoWindow) {
+  for (var key in this._pointInfoWindow) {
     if (this._pointInfoWindow.hasOwnProperty(key)) {
       if (this._pointInfoWindow[key].isOpened()) {
         promises.push(this._pointInfoWindow[key].update());
       }
     }
   }
-  for ( var aliasKey in this._aliasInfoWindow) {
+  for (var aliasKey in this._aliasInfoWindow) {
     if (this._aliasInfoWindow.hasOwnProperty(aliasKey)) {
       if (this._aliasInfoWindow[aliasKey].isOpened()) {
         promises.push(this._aliasInfoWindow[aliasKey].update());
@@ -734,11 +749,11 @@ AbstractCustomMap.prototype._refreshInfoWindows = function() {
 
 /**
  * Opens {@link ReactionInfoWindow} for given reaction identifier.
- * 
+ *
  * @param reactionId
  *          reaction identifier
  */
-AbstractCustomMap.prototype._openInfoWindowForReaction = function(reaction, googleMarker) {
+AbstractCustomMap.prototype._openInfoWindowForReaction = function (reaction, googleMarker) {
   var infoWindow = this.getReactionInfoWindowById(reaction.getId());
   var self = this;
   if (infoWindow !== null && infoWindow !== undefined) {
@@ -749,21 +764,21 @@ AbstractCustomMap.prototype._openInfoWindowForReaction = function(reaction, goog
     }
     return Promise.resolve(infoWindow);
   } else {
-    return self.getModel().getReactionById(reaction.getId()).then(function(reaction) {
+    return self.getModel().getReactionById(reaction.getId()).then(function (reaction) {
       infoWindow = new ReactionInfoWindow({
-        reaction : reaction,
-        map : self,
-        marker : googleMarker,
+        reaction: reaction,
+        map: self,
+        marker: googleMarker,
       });
       self._reactionInfoWindow[reaction.getId()] = infoWindow;
       return infoWindow.init();
-    }).then(function() {
+    }).then(function () {
       return infoWindow;
     });
   }
 };
 
-AbstractCustomMap.prototype._openInfoWindowForPoint = function(pointData, googleMarker) {
+AbstractCustomMap.prototype._openInfoWindowForPoint = function (pointData, googleMarker) {
   var self = this;
 
   var infoWindow = this.getPointInfoWindowById(pointData.getId());
@@ -775,9 +790,9 @@ AbstractCustomMap.prototype._openInfoWindowForPoint = function(pointData, google
     }
   } else {
     infoWindow = new PointInfoWindow({
-      point : pointData,
-      map : self,
-      marker : googleMarker,
+      point: pointData,
+      map: self,
+      marker: googleMarker,
     });
     this._pointInfoWindow[pointData.getId()] = infoWindow;
   }
@@ -786,11 +801,11 @@ AbstractCustomMap.prototype._openInfoWindowForPoint = function(pointData, google
 
 /**
  * Opens {@link AbstractInfoWindow} for a marker.
- * 
+ *
  * @param marker
  *          marker for which we are opening window
  */
-AbstractCustomMap.prototype.returnInfoWindowForIdentifiedElement = function(element) {
+AbstractCustomMap.prototype.returnInfoWindowForIdentifiedElement = function (element) {
   var markerId = element.getId();
   if (element.getType() === "ALIAS") {
     return this.getAliasInfoWindowById(markerId);
@@ -805,30 +820,30 @@ AbstractCustomMap.prototype.returnInfoWindowForIdentifiedElement = function(elem
 
 /**
  * Returns identifier.
- * 
+ *
  * @returns identifier
  */
-AbstractCustomMap.prototype.getId = function() {
+AbstractCustomMap.prototype.getId = function () {
   return this.getModel().getId();
 };
 
-AbstractCustomMap.prototype.getConfiguration = function() {
+AbstractCustomMap.prototype.getConfiguration = function () {
   return this._configuration;
 };
 
-AbstractCustomMap.prototype.setConfiguration = function(configuration) {
+AbstractCustomMap.prototype.setConfiguration = function (configuration) {
   this._configuration = configuration;
 };
 
-AbstractCustomMap.prototype._createMapChangedCallbacks = function() {
+AbstractCustomMap.prototype._createMapChangedCallbacks = function () {
   var self = this;
   var sessionData = ServerConnector.getSessionData(self.getTopMap().getProject());
   // listener for changing zoom level
-  google.maps.event.addListener(this.getGoogleMap(), 'zoom_changed', function() {
+  google.maps.event.addListener(this.getGoogleMap(), 'zoom_changed', function () {
     sessionData.setZoomLevel(self.getModel(), self.getGoogleMap().getZoom());
   });
   // listener for changing location of the map (moving left/reght/top/bottom
-  google.maps.event.addListener(this.getGoogleMap(), 'center_changed', function() {
+  google.maps.event.addListener(this.getGoogleMap(), 'center_changed', function () {
     var coord = self.getGoogleMap().getCenter();
     var point = self.fromLatLngToPoint(coord);
     sessionData.setCenter(self.getModel(), point);
@@ -837,62 +852,62 @@ AbstractCustomMap.prototype._createMapChangedCallbacks = function() {
 
 /**
  * Returns {@link ReactionInfoWindow} for given reaction identifier
- * 
+ *
  * @param reactionId
  *          reaction identifier
  * @returns {@link ReactionInfoWindow} for given reaction identifier
  */
-AbstractCustomMap.prototype.getReactionInfoWindowById = function(reactionId) {
+AbstractCustomMap.prototype.getReactionInfoWindowById = function (reactionId) {
   return this._reactionInfoWindow[reactionId];
 };
 
 /**
  * Returns {@link AliasInfoWindow} for given alias identifier
- * 
+ *
  * @param aliasId
  *          alias identifier
  * @returns {@link AliasInfoWindow} for given alias identifier
  */
-AbstractCustomMap.prototype.getAliasInfoWindowById = function(aliasId) {
+AbstractCustomMap.prototype.getAliasInfoWindowById = function (aliasId) {
   return this._aliasInfoWindow[aliasId];
 };
 
 /**
  * Returns {@link PointInfoWindow} for given point identifier
- * 
+ *
  * @param pointId
  *          point identifier
  * @returns {@link PointInfoWindow} for given point identifier
  */
-AbstractCustomMap.prototype.getPointInfoWindowById = function(pointId) {
+AbstractCustomMap.prototype.getPointInfoWindowById = function (pointId) {
   return this._pointInfoWindow[pointId];
 };
 
-AbstractCustomMap.prototype.getModel = function() {
+AbstractCustomMap.prototype.getModel = function () {
   return this._model;
 };
 
-AbstractCustomMap.prototype.setModel = function(model) {
+AbstractCustomMap.prototype.setModel = function (model) {
   this._model = model;
 };
 
-AbstractCustomMap.prototype.getTileSize = function() {
+AbstractCustomMap.prototype.getTileSize = function () {
   return this.getModel().getTileSize();
 };
 
-AbstractCustomMap.prototype.getMinZoom = function() {
+AbstractCustomMap.prototype.getMinZoom = function () {
   return this.getModel().getMinZoom();
 };
 
-AbstractCustomMap.prototype.getMaxZoom = function() {
+AbstractCustomMap.prototype.getMaxZoom = function () {
   return this.getModel().getMaxZoom();
 };
 
-AbstractCustomMap.prototype.getLayouts = function() {
+AbstractCustomMap.prototype.getLayouts = function () {
   return this.getModel().getLayouts();
 };
 
-AbstractCustomMap.prototype.getPictureSize = function() {
+AbstractCustomMap.prototype.getPictureSize = function () {
   return this.getModel().getPictureSize();
 };
 
@@ -900,45 +915,45 @@ AbstractCustomMap.prototype.getPictureSize = function() {
  * Returns array containining elements that are presented on a specific layout
  * (set of google map objects representing lines/areas that are associated with
  * layout).
- * 
+ *
  * @returns {Array} containining elements that are presented on a specific
  *          layout (set of google map objects representing lines/areas that are
  *          associated with layout).
  */
-AbstractCustomMap.prototype.getSelectedLayoutOverlays = function() {
+AbstractCustomMap.prototype.getSelectedLayoutOverlays = function () {
   return this.selectedLayoutOverlays;
 };
 
 /**
  * Returns google.maps.map object used to representing data.
- * 
+ *
  * @returns google.maps.map object used to representing data
  */
-AbstractCustomMap.prototype.getGoogleMap = function() {
+AbstractCustomMap.prototype.getGoogleMap = function () {
   return this._map;
 };
 
 /**
  * Sets google.maps.map object used to representing data.
- * 
+ *
  */
-AbstractCustomMap.prototype.setGoogleMap = function(gmap) {
+AbstractCustomMap.prototype.setGoogleMap = function (gmap) {
   this._map = gmap;
 };
 
-AbstractCustomMap.prototype.isMarkerOptimization = function() {
+AbstractCustomMap.prototype.isMarkerOptimization = function () {
   return this._markerOptimization;
 };
 
-AbstractCustomMap.prototype.isBigLogo = function() {
+AbstractCustomMap.prototype.isBigLogo = function () {
   return this._bigLogo;
 };
 
-AbstractCustomMap.prototype.isCustomTouchInterface = function() {
+AbstractCustomMap.prototype.isCustomTouchInterface = function () {
   return this._customTouchInterface;
 };
 
-AbstractCustomMap.prototype.setDebug = function(debug) {
+AbstractCustomMap.prototype.setDebug = function (debug) {
   if (debug !== undefined) {
     if (typeof debug !== "boolean") {
       logger.warn("param must be boolean");
@@ -947,32 +962,32 @@ AbstractCustomMap.prototype.setDebug = function(debug) {
   }
 };
 
-AbstractCustomMap.prototype.isDebug = function() {
+AbstractCustomMap.prototype.isDebug = function () {
   return this._debug === true;
 };
 
-AbstractCustomMap.prototype.getTopLeftLatLng = function() {
+AbstractCustomMap.prototype.getTopLeftLatLng = function () {
   return this.getModel().getTopLeftLatLng();
 };
 
-AbstractCustomMap.prototype.getBottomRightLatLng = function() {
+AbstractCustomMap.prototype.getBottomRightLatLng = function () {
   return this.getModel().getBottomRightLatLng();
 };
 
-AbstractCustomMap.prototype.getElement = function() {
+AbstractCustomMap.prototype.getElement = function () {
   return this._element;
 };
-AbstractCustomMap.prototype.setElement = function(element) {
+AbstractCustomMap.prototype.setElement = function (element) {
   this._element = element;
 };
 
 /**
  * Sets center point for google maps.
- * 
+ *
  * @param coordinates
  *          new center point on map
  */
-AbstractCustomMap.prototype.setCenter = function(coordinates) {
+AbstractCustomMap.prototype.setCenter = function (coordinates) {
   if (coordinates instanceof google.maps.Point) {
     coordinates = this.fromPointToLatLng(coordinates);
   }
@@ -986,13 +1001,13 @@ AbstractCustomMap.prototype.setCenter = function(coordinates) {
 
 /**
  * Sets zoom level for google maps.
- * 
+ *
  * @param mapIdentifier
  *          id of the model for which we change zoom level
  * @param zoom
  *          new zoom level on map
  */
-AbstractCustomMap.prototype.setZoom = function(zoom) {
+AbstractCustomMap.prototype.setZoom = function (zoom) {
   if (this.initialized) {
     return Promise.resolve(this.getGoogleMap().setZoom(zoom));
   } else {
@@ -1001,7 +1016,7 @@ AbstractCustomMap.prototype.setZoom = function(zoom) {
   }
 };
 
-AbstractCustomMap.prototype.fitBounds = function(markers) {
+AbstractCustomMap.prototype.fitBounds = function (markers) {
   var self = this;
   var map = self.getGoogleMap();
   if (map !== undefined) {
diff --git a/frontend-js/src/main/js/map/CustomMap.js b/frontend-js/src/main/js/map/CustomMap.js
index 0ad9cc8620eaeeb7886d310f8cc178f3ceb9571d..9d55d00fe139b738143d44e2d285dce0ffa644cc 100644
--- a/frontend-js/src/main/js/map/CustomMap.js
+++ b/frontend-js/src/main/js/map/CustomMap.js
@@ -28,7 +28,7 @@ var TouchMap = require('./TouchMap');
 
 /**
  * Default constructor.
- * 
+ *
  * @param options
  *          CustomMapOptions object representing all parameters needed for map
  *          creation
@@ -75,12 +75,12 @@ CustomMap.prototype.constructor = CustomMap;
 /**
  * This code must be run after the object is created. It requires to download
  * some data via promises.
- * 
+ *
  * @return promise with empty result
  */
-CustomMap.prototype.init = function() {
+CustomMap.prototype.init = function () {
   var self = this;
-  return ServerConnector.getLogoImg().then(function(url) {
+  return ServerConnector.getLogoImg().then(function (url) {
     var logo2 = self.getControl(ControlType.LOGO_2_IMG);
     if (!/^(f|ht)tps?:\/\//i.test(url)) {
       url = GuiConnector.getImgPrefix() + url;
@@ -92,7 +92,7 @@ CustomMap.prototype.init = function() {
 /**
  * Create submaps.
  */
-CustomMap.prototype.createSubmaps = function() {
+CustomMap.prototype.createSubmaps = function () {
   this.submaps = [];
   for (var i = 0; i < this.getModel().getSubmodels().length; i++) {
     this.submaps.push(new Submap(this, this.getModel().getSubmodels()[i]));
@@ -102,7 +102,7 @@ CustomMap.prototype.createSubmaps = function() {
 /**
  * Creates logo and put it on the google map.
  */
-CustomMap.prototype.createLogo = function() {
+CustomMap.prototype.createLogo = function () {
   var logoControlDiv2 = document.createElement('DIV');
   var logo2 = document.createElement('IMG');
   logo2.style.cursor = 'pointer';
@@ -111,8 +111,8 @@ CustomMap.prototype.createLogo = function() {
   this.addControl(logo2);
 
   logoControlDiv2.appendChild(logo2);
-  google.maps.event.addDomListener(logo2, 'click', function() {
-    return ServerConnector.getLogoLink().then(function(url) {
+  google.maps.event.addDomListener(logo2, 'click', function () {
+    return ServerConnector.getLogoLink().then(function (url) {
       var win = window.open(url, '_blank');
       win.focus();
     });
@@ -130,7 +130,7 @@ CustomMap.prototype.createLogo = function() {
   this.addControl(logo);
 
   logoControlDiv.appendChild(logo);
-  google.maps.event.addDomListener(logo, 'click', function() {
+  google.maps.event.addDomListener(logo, 'click', function () {
     var win = window.open('http://wwwen.uni.lu/lcsb/', '_blank');
     win.focus();
   });
@@ -142,9 +142,9 @@ CustomMap.prototype.createLogo = function() {
 /**
  * Clear all AbstractDbOverlay.
  */
-CustomMap.prototype.clearDbOverlays = function() {
+CustomMap.prototype.clearDbOverlays = function () {
   var promises = [];
-  for ( var overlayName in this.overlayCollections) {
+  for (var overlayName in this.overlayCollections) {
     if (this.overlayCollections.hasOwnProperty(overlayName)) {
       var collection = this.overlayCollections[overlayName];
       promises.push(collection.clear());
@@ -155,11 +155,11 @@ CustomMap.prototype.clearDbOverlays = function() {
 
 /**
  * Open data overlay given in the parameter.
- * 
+ *
  * @param param
  *          identifier or LayoutData identifing data overlay to open
  */
-CustomMap.prototype.openDataOverlay = function(param) {
+CustomMap.prototype.openDataOverlay = function (param) {
   logger.debug("Opening data overlay: " + param);
 
   var self = this;
@@ -186,14 +186,14 @@ CustomMap.prototype.openDataOverlay = function(param) {
   if (index === null) {
     throw new SecurityError("You have no privileges for selected overlay");
   } else {
-    return overlayToOpen.init().then(function() {
+    return overlayToOpen.init().then(function () {
       if (overlayToOpen.getInputDataAvailable()) {
         if (self._selectedOverlays[identifier] === true) {
           logger.warn("Overlay " + identifier + " already selected");
           return Promise.resolve();
         } else {
           self._selectedOverlays[identifier] = true;
-          return self.getVisibleDataOverlays().then(function(visibleDataOverlays) {
+          return self.getVisibleDataOverlays().then(function (visibleDataOverlays) {
             var ids = [];
             for (var i = 0; i < visibleDataOverlays.length; i++) {
               ids.push(visibleDataOverlays[i].getId());
@@ -220,7 +220,7 @@ CustomMap.prototype.openDataOverlay = function(param) {
 /**
  * Returns data overlay that is used as a background.
  */
-CustomMap.prototype.getBackgroundDataOverlay = function() {
+CustomMap.prototype.getBackgroundDataOverlay = function () {
   var identifier = parseInt(this.getGoogleMap().getMapTypeId());
   for (var i = 0; i < this.getLayouts().length; i++) {
     var layout = this.getLayouts()[i];
@@ -233,54 +233,54 @@ CustomMap.prototype.getBackgroundDataOverlay = function() {
 
 /**
  * Register AbstractDbOverlay in the map.
- * 
+ *
  * @param dbOverlay
  *          database overlay to be connected to the map
  */
-CustomMap.prototype.registerDbOverlay = function(dbOverlay) {
+CustomMap.prototype.registerDbOverlay = function (dbOverlay) {
   var self = this;
 
   this.overlayCollections[dbOverlay.getName()] = dbOverlay;
 
   dbOverlay.markers = {
-    ALIAS : [],
-    REACTION : [],
-    POINT : []
+    ALIAS: [],
+    REACTION: [],
+    POINT: []
   };
   dbOverlay.mapOverlays = {
-    ALIAS : [],
-    REACTION : [],
-    POINT : []
+    ALIAS: [],
+    REACTION: [],
+    POINT: []
   };
 
   if (dbOverlay.getName() === "search" || dbOverlay.getName() === "user") {
-    dbOverlay.addListener("onSearch", function(e) {
+    dbOverlay.addListener("onSearch", function (e) {
       return self.renderOverlayCollection({
-        overlayCollection : dbOverlay,
-        fitBounds : e.arg.fitBounds
+        overlayCollection: dbOverlay,
+        fitBounds: e.arg.fitBounds
       });
     });
   }
   if (dbOverlay.getName() === "drug" || dbOverlay.getName() === "chemical" || dbOverlay.getName() === "mirna") {
-    dbOverlay.addListener("onSearch", function(e) {
+    dbOverlay.addListener("onSearch", function (e) {
       return self.renderOverlayCollection({
-        overlayCollection : dbOverlay,
-        fitBounds : e.arg.fitBounds
+        overlayCollection: dbOverlay,
+        fitBounds: e.arg.fitBounds
       });
     });
 
-    dbOverlay.addListener("onTargetVisibilityChange", function() {
+    dbOverlay.addListener("onTargetVisibilityChange", function () {
       return self.renderOverlayCollection({
-        overlayCollection : dbOverlay,
-        fitBounds : false
+        overlayCollection: dbOverlay,
+        fitBounds: false
       });
     });
   }
   if (dbOverlay.getName() === "comment") {
-    var listener = function() {
+    var listener = function () {
       return self.renderOverlayCollection({
-        overlayCollection : dbOverlay,
-        fitBounds : false
+        overlayCollection: dbOverlay,
+        fitBounds: false
       });
     };
     dbOverlay.addListener("onRefresh", listener);
@@ -291,10 +291,10 @@ CustomMap.prototype.registerDbOverlay = function(dbOverlay) {
 
 /**
  * Refresh comment list.
- * 
+ *
  * @return promise that is resolved when comment list is refreshed
  */
-CustomMap.prototype.refreshComments = function() {
+CustomMap.prototype.refreshComments = function () {
   var self = this;
 
   var commentDbOverlay = self.getOverlayByName("comment");
@@ -311,7 +311,7 @@ CustomMap.prototype.refreshComments = function() {
 /**
  * Turns on/off drawing module on google maps.
  */
-CustomMap.prototype.turnOnOffDrawing = function() {
+CustomMap.prototype.turnOnOffDrawing = function () {
   var model = this.getSubmapById(this.getActiveSubmapId());
   if (model !== undefined) {
     model._turnOnOffDrawing();
@@ -320,24 +320,24 @@ CustomMap.prototype.turnOnOffDrawing = function() {
   }
 };
 
-CustomMap.prototype.refreshMarkers = function() {
+CustomMap.prototype.refreshMarkers = function (force) {
   logger.debug("Refresh Markers: ");
-  for ( var overlayName in this.overlayCollections) {
+  for (var overlayName in this.overlayCollections) {
     if (this.overlayCollections.hasOwnProperty(overlayName)) {
       var collection = this.overlayCollections[overlayName];
-      this.refreshOverlayMarkers(collection);
+      this.refreshOverlayMarkers(collection, force);
     }
   }
 };
 
-CustomMap.prototype.refreshOverlayMarkers = function(overlay) {
+CustomMap.prototype.refreshOverlayMarkers = function (overlay, force) {
   logger.debug("Refresh overlay: " + overlay.name);
 
-  if (!this.isMarkerOptimization()) {
-    for ( var markerType in overlay.markers) {
+  if (!this.isMarkerOptimization() || force) {
+    for (var markerType in overlay.markers) {
       if (overlay.markers.hasOwnProperty(markerType)) {
         var markers = overlay.markers[markerType];
-        for ( var key in markers) {
+        for (var key in markers) {
           if (markers.hasOwnProperty(key)) {
             var marker = markers[key];
             marker.hide();
@@ -352,11 +352,11 @@ CustomMap.prototype.refreshOverlayMarkers = function(overlay) {
 /**
  * Returns HTML div that is attached to jQuery dialog that should be used for
  * opening submap.
- * 
+ *
  * @param id
  *          identifier of the submap
  */
-CustomMap.prototype.getSubmapDialogDiv = function(id) {
+CustomMap.prototype.getSubmapDialogDiv = function (id) {
   var dialogDiv = this._dialogs[id];
 
   if (dialogDiv === undefined) {
@@ -366,7 +366,7 @@ CustomMap.prototype.getSubmapDialogDiv = function(id) {
     this._dialogs[id] = dialogDiv;
 
     $(dialogDiv).dialog({
-      autoOpen : false
+      autoOpen: false
     });
   }
   return dialogDiv;
@@ -375,7 +375,7 @@ CustomMap.prototype.getSubmapDialogDiv = function(id) {
 /**
  * Opens a dialog with a submodel.
  */
-CustomMap.prototype.openSubmap = function(id) {
+CustomMap.prototype.openSubmap = function (id) {
   var self = this;
   var submap = self.getSubmapById(id);
   if (submap === null) {
@@ -388,12 +388,12 @@ CustomMap.prototype.openSubmap = function(id) {
     submap.open(dialogDiv);
 
     // we have to perform it on top map, because on submaps id is different
-    return this.openDataOverlay(self.getGoogleMap().getMapTypeId()).then(function() {
+    return this.openDataOverlay(self.getGoogleMap().getMapTypeId()).then(function () {
       // now we have to visualize layouts
       var layouts = [];
 
       // get list of layouts
-      for ( var key in self._selectedOverlays) {
+      for (var key in self._selectedOverlays) {
         if (self._selectedOverlays.hasOwnProperty(key) && self._selectedOverlays[key] === true) {
           layouts.push(key);
         }
@@ -405,14 +405,14 @@ CustomMap.prototype.openSubmap = function(id) {
         submap._showSelectedLayout(layoutId, i, layouts.length);
       }
       if (!wasInitialized) {
-        return self.refreshMarkers();
+        return self.refreshMarkers(true);
       }
     });
   }
 
 };
 
-CustomMap.prototype.customizeGoogleMapView = function(div) {
+CustomMap.prototype.customizeGoogleMapView = function (div) {
   var mapOptions = this.creatMapOptions();
   this.setGoogleMap(new google.maps.Map(div, mapOptions));
   this.setupLayouts();
@@ -440,7 +440,7 @@ CustomMap.prototype.customizeGoogleMapView = function(div) {
  * Creates listeners for google.maps.Map object that will actualize the data in
  * user session.
  */
-CustomMap.prototype.createMapChangedCallbacks = function() {
+CustomMap.prototype.createMapChangedCallbacks = function () {
   this._createMapChangedCallbacks();
   var self = this;
   var sessionData = ServerConnector.getSessionData(self.getProject());
@@ -455,7 +455,7 @@ CustomMap.prototype.createMapChangedCallbacks = function() {
   }
 
   // listener for changing type of layout
-  google.maps.event.addListener(self.getGoogleMap(), 'maptypeid_changed', function() {
+  google.maps.event.addListener(self.getGoogleMap(), 'maptypeid_changed', function () {
     sessionData.setSelectedBackgroundOverlay(self.getGoogleMap().getMapTypeId());
   });
 
@@ -477,12 +477,12 @@ CustomMap.prototype.createMapChangedCallbacks = function() {
 
 /**
  * Returns submap (or this map) by id.
- * 
+ *
  * @param identifier
  *          identifier of the submap
  * @returns submap (or this map) with given identfier of the model
  */
-CustomMap.prototype.getSubmapById = function(identifier) {
+CustomMap.prototype.getSubmapById = function (identifier) {
   identifier = parseInt(identifier);
   if (this.getId() === identifier) {
     return this;
@@ -496,7 +496,7 @@ CustomMap.prototype.getSubmapById = function(identifier) {
   return null;
 };
 
-CustomMap.prototype.removeSelection = function() {
+CustomMap.prototype.removeSelection = function () {
   var model = this.getSubmapById(this.getActiveSubmapId());
   if (model !== null) {
     model._removeSelection();
@@ -507,12 +507,12 @@ CustomMap.prototype.removeSelection = function() {
 
 /**
  * Removes layout from visualization.
- * 
+ *
  * @param identifier
  *          identifier of layout to remove
- * 
+ *
  */
-CustomMap.prototype.removeSelectedLayout = function(identifier) {
+CustomMap.prototype.removeSelectedLayout = function (identifier) {
   var self = this;
   logger.debug("Removing layout: " + identifier);
 
@@ -521,9 +521,9 @@ CustomMap.prototype.removeSelectedLayout = function(identifier) {
     return Promise.resolve();
   } else {
     self._selectedOverlays[identifier] = false;
-    return self.refreshSelectedLayouts().then(function() {
+    return self.refreshSelectedLayouts().then(function () {
       return self.getVisibleDataOverlays();
-    }).then(function(visibleDataOverlays) {
+    }).then(function (visibleDataOverlays) {
       var ids = [];
       for (var i = 0; i < visibleDataOverlays.length; i++) {
         ids.push(visibleDataOverlays[i].getId());
@@ -537,10 +537,10 @@ CustomMap.prototype.removeSelectedLayout = function(identifier) {
 /**
  * Refresh visualization of selected layouts.
  */
-CustomMap.prototype.refreshSelectedLayouts = function() {
+CustomMap.prototype.refreshSelectedLayouts = function () {
   logger.debug("Refreshing layouts");
   var self = this;
-  return self.getVisibleDataOverlays().then(function(visibleDataOverlays) {
+  return self.getVisibleDataOverlays().then(function (visibleDataOverlays) {
     // show layouts that should be visualized (resize or show them)
     var promises = [];
     for (var i = 0; i < visibleDataOverlays.length; i++) {
@@ -552,9 +552,9 @@ CustomMap.prototype.refreshSelectedLayouts = function() {
         promises.push(self.showSelectedLayout(layoutId, i, visibleDataOverlays.length));
       }
     }
-    return Promise.all(promises).then(function() {
+    return Promise.all(promises).then(function () {
       // remove layouts that were
-      for ( var key in self.selectedLayoutOverlays) {
+      for (var key in self.selectedLayoutOverlays) {
         if (!self._selectedOverlays.hasOwnProperty(key) || self._selectedOverlays[key] === false) {
           if (self.layoutContainsOverlays(key)) {
             self.hideSelectedLayout(key);
@@ -568,11 +568,11 @@ CustomMap.prototype.refreshSelectedLayouts = function() {
 
 /**
  * Hides layout from the map and all submaps
- * 
+ *
  * @param layoutId
  *          identifier of a layout to hide
  */
-CustomMap.prototype.hideSelectedLayout = function(layoutId) {
+CustomMap.prototype.hideSelectedLayout = function (layoutId) {
   this._hideSelectedLayout(layoutId);
   for (var i = 0; i < this.submaps.length; i++) {
     this.submaps[i]._hideSelectedLayout(layoutId);
@@ -582,7 +582,7 @@ CustomMap.prototype.hideSelectedLayout = function(layoutId) {
 /**
  * Resize(refresh) layout on the map and all submaps. Resizing should be called
  * when number of layouts to visualize change.
- * 
+ *
  * @param layoutId
  *          identifier of layout to refresh
  * @param index
@@ -590,7 +590,7 @@ CustomMap.prototype.hideSelectedLayout = function(layoutId) {
  * @param length
  *          number of layouts that we currently visualize
  */
-CustomMap.prototype.resizeSelectedLayout = function(layoutId, index, length) {
+CustomMap.prototype.resizeSelectedLayout = function (layoutId, index, length) {
   logger.debug("Resize layout: " + layoutId);
   var promises = [];
   promises.push(this._resizeSelectedLayout(layoutId, index, length));
@@ -602,7 +602,7 @@ CustomMap.prototype.resizeSelectedLayout = function(layoutId, index, length) {
 
 /**
  * Show layout on the map and all submaps.
- * 
+ *
  * @param layoutId
  *          identifier of layout to show
  * @param index
@@ -610,7 +610,7 @@ CustomMap.prototype.resizeSelectedLayout = function(layoutId, index, length) {
  * @param length
  *          number of layouts that we currently visualize
  */
-CustomMap.prototype.showSelectedLayout = function(layoutId, index, length) {
+CustomMap.prototype.showSelectedLayout = function (layoutId, index, length) {
   logger.debug("Resize layout: " + layoutId);
   var promises = [];
   promises.push(this._showSelectedLayout(layoutId, index, length));
@@ -624,13 +624,13 @@ CustomMap.prototype.showSelectedLayout = function(layoutId, index, length) {
 /**
  * This method checks if the layout contains any overlays (like AliasSurface or
  * ReactionSurface) that is currently visible on the map.
- * 
+ *
  * @param layoutId
  *          identifier of the layout
  * @returns {Boolean}: <code>true</code> if the layout contains overlays to
  *          visualize, <code>false</code> otherwise
  */
-CustomMap.prototype.layoutContainsOverlays = function(layoutId) {
+CustomMap.prototype.layoutContainsOverlays = function (layoutId) {
 
   // first, check top map
   if (this.selectedLayoutOverlays.hasOwnProperty(layoutId) && this.selectedLayoutOverlays[layoutId].length > 0) {
@@ -641,7 +641,7 @@ CustomMap.prototype.layoutContainsOverlays = function(layoutId) {
   for (var i = 0; i < this.submaps.length; i++) {
     if (this.submaps[i].initialized) {
       if (this.submaps[i].selectedLayoutOverlays.hasOwnProperty(layoutId)
-          && this.submaps[i].selectedLayoutOverlays[layoutId].length > 0) {
+        && this.submaps[i].selectedLayoutOverlays[layoutId].length > 0) {
         return true;
       }
     }
@@ -652,7 +652,7 @@ CustomMap.prototype.layoutContainsOverlays = function(layoutId) {
 /**
  * Refresh content of all {@link AliasInfoWindow} in this map and all submaps.
  */
-CustomMap.prototype.refreshInfoWindows = function() {
+CustomMap.prototype.refreshInfoWindows = function () {
   var promises = [];
   promises.push(this._refreshInfoWindows());
   // now check all submaps
@@ -664,13 +664,13 @@ CustomMap.prototype.refreshInfoWindows = function() {
 
 /**
  * Opens {@link AliasInfoWindow} for an {@link Alias} in a given model/submodel.
- * 
+ *
  * @param aliasId
  *          identifier of {@link Alias}
  * @param modelId
  *          identifier of {@link AbstractCustomMap}
  */
-CustomMap.prototype.openInfoWindowForAlias = function(alias, marker) {
+CustomMap.prototype.openInfoWindowForAlias = function (alias, marker) {
   logger.debug("Opening info window for alias: " + alias.getId() + ", model: " + alias.getModelId());
   var submap = this.getSubmapById(alias.getModelId());
   return submap._openInfoWindowForAlias(alias, marker);
@@ -678,14 +678,14 @@ CustomMap.prototype.openInfoWindowForAlias = function(alias, marker) {
 
 /**
  * Renders markers, lines, etc. for elements highlighted in OverlayCollection.
- * 
+ *
  * @param overlayCollection
  *          {@link OverlayCollection} to be processed
  * @param fitBounds
  *          <code>true</code> if the borders should fit bounds after creating
  *          all elements
  */
-CustomMap.prototype.renderOverlayCollection = function(params) {
+CustomMap.prototype.renderOverlayCollection = function (params) {
   var self = this;
   var fitBounds = params.fitBounds;
   var overlayCollection = params.overlayCollection;
@@ -693,33 +693,52 @@ CustomMap.prototype.renderOverlayCollection = function(params) {
   var elements;
   var markers = [];
 
-  return overlayCollection.getIdentifiedElements().then(function(identifiedElements) {
+  return overlayCollection.getIdentifiedElements().then(function (identifiedElements) {
     elements = identifiedElements;
 
-    return Promise.each(elements, function(element) {
+    var elementsByModelId = [];
+    var modelId;
+
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      modelId = element.getModelId();
+      if (elementsByModelId[modelId] === undefined) {
+        elementsByModelId[modelId] = [];
+      }
+      elementsByModelId[modelId].push(element);
+    }
+    var promises = [];
+    for (modelId in elementsByModelId) {
+      if (elementsByModelId.hasOwnProperty(modelId)) {
+        promises.push(self.getModel().getSubmodelById(parseInt(modelId)).getByIdentifiedElements(elementsByModelId[modelId], false));
+      }
+    }
+    return Promise.all(promises);
+  }).then(function () {
+    return Promise.each(elements, function (element) {
       var icon = element.getIcon();
       if (icon !== null && icon !== undefined) {
-        return self.createMarkerForDbOverlay(element, overlayCollection).then(function(marker) {
+        return self.createMarkerForDbOverlay(element, overlayCollection).then(function (marker) {
           markers.push(marker);
         });
       } else {
-        return self.createSurfaceForDbOverlay(element, overlayCollection).then(function(mapOverlay) {
+        return self.createSurfaceForDbOverlay(element, overlayCollection).then(function (mapOverlay) {
           markers.push(mapOverlay);
         });
       }
     });
-  }).then(function() {
+  }).then(function () {
     self.removeUnmodifiedMarkersAndSurfaces(markers, overlayCollection);
 
-    return Promise.each(elements, function(element) {
+    return Promise.each(elements, function (element) {
       var infoWindow = self.getInfoWindowForIdentifiedElement(element);
       if (infoWindow !== null && infoWindow !== undefined) {
-        return self.retrieveOverlayDetailDataForElement(element, infoWindow.getOverlayFullViewArray()).then(function() {
+        return self.retrieveOverlayDetailDataForElement(element, infoWindow.getOverlayFullViewArray()).then(function () {
           return self.updateInfoWindowForIdentifiedElement(element);
         });
       }
     });
-  }).then(function() {
+  }).then(function () {
     if (elements.length > 0 && fitBounds) {
       self.fitBounds(markers);
       for (var j = 0; j < self.submaps.length; j++) {
@@ -729,16 +748,16 @@ CustomMap.prototype.renderOverlayCollection = function(params) {
   });
 };
 
-CustomMap.prototype.removeUnmodifiedMarkersAndSurfaces = function(modifiedMarkersAndSurfaces, dbOverlay) {
+CustomMap.prototype.removeUnmodifiedMarkersAndSurfaces = function (modifiedMarkersAndSurfaces, dbOverlay) {
   var modifiedMarkers = {
-    "ALIAS" : [],
-    "REACTION" : [],
-    "POINT" : [],
+    "ALIAS": [],
+    "REACTION": [],
+    "POINT": [],
   };
   var modifiedSurfaces = {
-    "ALIAS" : [],
-    "REACTION" : [],
-    "POINT" : [],
+    "ALIAS": [],
+    "REACTION": [],
+    "POINT": [],
   };
 
   for (var i = 0; i < modifiedMarkersAndSurfaces.length; i++) {
@@ -781,17 +800,17 @@ CustomMap.prototype.removeUnmodifiedMarkersAndSurfaces = function(modifiedMarker
 
 /**
  * Opens {@link AbstractInfoWindow} for a marker.
- * 
+ *
  * @param marker
  *          {@link AbstractMarker} for which info window should be opened
  */
-CustomMap.prototype.openInfoWindowForIdentifiedElement = function(element, marker) {
+CustomMap.prototype.openInfoWindowForIdentifiedElement = function (element, marker) {
   var self = this;
   var submap = self.getSubmapById(element.getModelId());
   logger.debug(element + ": Opening info window");
 
   // open AliasInfoWindow in a right model
-  return submap._openInfoWindowForIdentifiedElement(element, marker).then(function() {
+  return submap._openInfoWindowForIdentifiedElement(element, marker).then(function () {
     var infoWindow = submap.returnInfoWindowForIdentifiedElement(element);
     return self.retrieveOverlayDetailDataForElement(element, infoWindow.getOverlayFullViewArray());
   });
@@ -801,17 +820,17 @@ CustomMap.prototype.openInfoWindowForIdentifiedElement = function(element, marke
 /**
  * Sends requestes to download detailed data about element in all
  * {@link OverlayCollection}.
- * 
+ *
  * @param element
  *          element for which we want to have detailed information
  */
-CustomMap.prototype.retrieveOverlayDetailDataForElement = function(element, general) {
+CustomMap.prototype.retrieveOverlayDetailDataForElement = function (element, general) {
   var promises = [];
   if (general === undefined) {
     logger.warn("general param is undefined!");
     general = [];
   }
-  for ( var overlayName in this.overlayCollections) {
+  for (var overlayName in this.overlayCollections) {
     if (this.overlayCollections.hasOwnProperty(overlayName)) {
       var overlay = this.overlayCollections[overlayName];
 
@@ -830,11 +849,11 @@ CustomMap.prototype.retrieveOverlayDetailDataForElement = function(element, gene
 
 /**
  * Updates info window identified by element given as a parameter.
- * 
+ *
  * @param identifiedElement
  *          element for which info window should be updated
  */
-CustomMap.prototype.updateInfoWindowForIdentifiedElement = function(identifiedElement) {
+CustomMap.prototype.updateInfoWindowForIdentifiedElement = function (identifiedElement) {
   var infoWindow = this.getInfoWindowForIdentifiedElement(identifiedElement);
   if (infoWindow === null || infoWindow === undefined) {
     return Promise.resolve();
@@ -845,7 +864,7 @@ CustomMap.prototype.updateInfoWindowForIdentifiedElement = function(identifiedEl
 
 /**
  * Returns data from all {@link OverlayCollection} for a given alias.
- * 
+ *
  * @param alias
  *          {@link Alias} for which overlay data will be returned
  * @param general
@@ -853,14 +872,14 @@ CustomMap.prototype.updateInfoWindowForIdentifiedElement = function(identifiedEl
  *          availble right now in the overlay
  * @returns data from all {@link OverlayCollection} for a given alias
  */
-CustomMap.prototype.getOverlayDataForAlias = function(alias, general) {
+CustomMap.prototype.getOverlayDataForAlias = function (alias, general) {
   var identifiedElement = new IdentifiedElement(alias);
   return this.getOverlayDataForIdentifiedElement(identifiedElement, general);
 };
 
 /**
  * Returns data from all {@link OverlayCollection} for a given reaction.
- * 
+ *
  * @param reaction
  *          {@link Reaction} for which overlay data will be returned
  * @param general
@@ -868,20 +887,20 @@ CustomMap.prototype.getOverlayDataForAlias = function(alias, general) {
  *          availble right now in the overlay
  * @returns data from all {@link OverlayCollection} for a given alias
  */
-CustomMap.prototype.getOverlayDataForReaction = function(reaction, general) {
+CustomMap.prototype.getOverlayDataForReaction = function (reaction, general) {
   var identifiedElement = new IdentifiedElement(reaction);
   return this.getOverlayDataForIdentifiedElement(identifiedElement, general);
 };
 
 /**
  * Returns data from all {@link OverlayCollection} for a given {@link PointData}
- * 
+ *
  * @param point
  *          {@link PointData} for which overlay data will be returned
  * @returns data from all {@link OverlayCollection} for a given
  *          {@link PointData}
  */
-CustomMap.prototype.getOverlayDataForPoint = function(point, general) {
+CustomMap.prototype.getOverlayDataForPoint = function (point, general) {
   var identifiedElement = new IdentifiedElement(point);
   return this.getOverlayDataForIdentifiedElement(identifiedElement, general);
 };
@@ -889,20 +908,20 @@ CustomMap.prototype.getOverlayDataForPoint = function(point, general) {
 /**
  * Returns data from all {@link OverlayCollection} for element identified by the
  * parameter
- * 
+ *
  * @param identifiedElement
  *          {@link IdentifiedElement} for which overlay data will be returned
  * @returns data from all {@link OverlayCollection} for a given
  *          {@link IdentifiedElement}
  */
-CustomMap.prototype.getOverlayDataForIdentifiedElement = function(identifiedElement, general) {
+CustomMap.prototype.getOverlayDataForIdentifiedElement = function (identifiedElement, general) {
   if (general === undefined) {
     logger.warn("general parameter must be defined");
     general = [];
   }
   var promises = [];
   var overlays = [];
-  for ( var overlayName in this.overlayCollections) {
+  for (var overlayName in this.overlayCollections) {
     if (this.overlayCollections.hasOwnProperty(overlayName)) {
       var overlay = this.overlayCollections[overlayName];
       if (overlay.allowGeneralSearch() || overlay.allowSearchById()) {
@@ -913,29 +932,29 @@ CustomMap.prototype.getOverlayDataForIdentifiedElement = function(identifiedElem
         }
         overlays.push(overlay);
         promises.push(overlay.getDetailDataByIdentifiedElement(identifiedElement, !overlay.allowSearchById()
-            || generalFlag));
+          || generalFlag));
       }
     }
   }
-  return Promise.all(promises).then(function(values) {
+  return Promise.all(promises).then(function (values) {
     var result = [];
     for (var i = 0; i < values.length; i++) {
       result.push({
-        overlay : overlays[i],
-        data : values[i]
+        overlay: overlays[i],
+        data: values[i]
       });
     }
     return result;
   });
 };
 
-CustomMap.prototype.getOverlayByName = function(name) {
+CustomMap.prototype.getOverlayByName = function (name) {
   return this.overlayCollections[name];
 };
 
-CustomMap.prototype.getDbOverlays = function() {
+CustomMap.prototype.getDbOverlays = function () {
   var result = [];
-  for ( var overlayName in this.overlayCollections) {
+  for (var overlayName in this.overlayCollections) {
     if (this.overlayCollections.hasOwnProperty(overlayName)) {
       result.push(this.overlayCollections[overlayName]);
     }
@@ -945,13 +964,13 @@ CustomMap.prototype.getDbOverlays = function() {
 
 /**
  * Returns {@link AbstractInfoWindow} for element identified by the parameter.
- * 
+ *
  * @param identifiedElement
  *          {@link IdentifiedElement} that determines for which element we want
  *          {@link AbstractInfoWindow}
  * @returns {@link AbstractInfoWindow} for element identified by the parameter
  */
-CustomMap.prototype.getInfoWindowForIdentifiedElement = function(identifiedElement) {
+CustomMap.prototype.getInfoWindowForIdentifiedElement = function (identifiedElement) {
   var model = this.getSubmapById(identifiedElement.modelId);
   var infoWindow = null;
   if (identifiedElement.type === "ALIAS") {
@@ -966,25 +985,25 @@ CustomMap.prototype.getInfoWindowForIdentifiedElement = function(identifiedEleme
   return infoWindow;
 };
 
-CustomMap.prototype.getActiveSubmapId = function() {
+CustomMap.prototype.getActiveSubmapId = function () {
   return this._activeSubmapId;
 };
 
-CustomMap.prototype.setActiveSubmapId = function(submapId) {
+CustomMap.prototype.setActiveSubmapId = function (submapId) {
   this._activeSubmapId = submapId;
 };
 
-CustomMap.prototype.setActiveSubmapClickCoordinates = function(coordinates) {
+CustomMap.prototype.setActiveSubmapClickCoordinates = function (coordinates) {
   if (!(coordinates instanceof google.maps.Point)) {
     throw new Error("Coordinates must be provided as google.maps.Point object, but found: " + coordinates);
   }
   this._activeSubmapCoordinates = coordinates;
 };
-CustomMap.prototype.getActiveSubmapClickCoordinates = function() {
+CustomMap.prototype.getActiveSubmapClickCoordinates = function () {
   return this._activeSubmapCoordinates;
 };
 
-CustomMap.prototype.getReferenceGenome = function(type, version) {
+CustomMap.prototype.getReferenceGenome = function (type, version) {
   var self = this;
   if (self.getProject().getOrganism() === undefined) {
     return Promise.resolve(new ReferenceGenome(null));
@@ -995,10 +1014,10 @@ CustomMap.prototype.getReferenceGenome = function(type, version) {
   }
   if (self._referenceGenome[type][version] === undefined) {
     return ServerConnector.getReferenceGenome({
-      type : type,
-      version : version,
-      organism : self.getProject().getOrganism().getResource(),
-    }).then(function(genome) {
+      type: type,
+      version: version,
+      organism: self.getProject().getOrganism().getResource(),
+    }).then(function (genome) {
       self._referenceGenome[type][version] = genome;
       return genome;
     });
@@ -1007,22 +1026,22 @@ CustomMap.prototype.getReferenceGenome = function(type, version) {
   }
 };
 
-CustomMap.prototype.getTopMap = function() {
+CustomMap.prototype.getTopMap = function () {
   return this;
 };
 
-CustomMap.prototype.setProject = function(project) {
+CustomMap.prototype.setProject = function (project) {
   this._project = project;
 };
-CustomMap.prototype.getProject = function() {
+CustomMap.prototype.getProject = function () {
   return this._project;
 };
 
-CustomMap.prototype.getTopOverviewImage = function() {
+CustomMap.prototype.getTopOverviewImage = function () {
   return this.getProject().getTopOverviewImage();
 };
 
-CustomMap.prototype.addControl = function(element) {
+CustomMap.prototype.addControl = function (element) {
   if (this._controls[element.id] !== undefined) {
     throw new Error("Element with id " + element.id + " already added to controls");
   }
@@ -1032,52 +1051,52 @@ CustomMap.prototype.addControl = function(element) {
   this._controls[element.id] = element;
 };
 
-CustomMap.prototype.getControl = function(type) {
+CustomMap.prototype.getControl = function (type) {
   if (ControlType[type] === undefined) {
     throw new Error("Unknown control type: " + type);
   }
   return this._controls[type];
 };
 
-CustomMap.prototype.setCommentDialog = function(commentDialog) {
+CustomMap.prototype.setCommentDialog = function (commentDialog) {
   this._commentDialog = commentDialog;
 };
 
-CustomMap.prototype.getCommentDialog = function() {
+CustomMap.prototype.getCommentDialog = function () {
   return this._commentDialog;
 };
 
-CustomMap.prototype.setContextMenu = function(contextMenu) {
+CustomMap.prototype.setContextMenu = function (contextMenu) {
   this._contextMenu = contextMenu;
 };
 
-CustomMap.prototype.getContextMenu = function() {
+CustomMap.prototype.getContextMenu = function () {
   return this._contextMenu;
 };
 
-CustomMap.prototype.setSelectionContextMenu = function(selectionContextMenu) {
+CustomMap.prototype.setSelectionContextMenu = function (selectionContextMenu) {
   this._selectionContextMenu = selectionContextMenu;
 };
 
-CustomMap.prototype.getSelectionContextMenu = function() {
+CustomMap.prototype.getSelectionContextMenu = function () {
   return this._selectionContextMenu;
 };
 
-CustomMap.prototype.openCommentDialog = function() {
+CustomMap.prototype.openCommentDialog = function () {
   var self = this;
   return ServerConnector.getClosestElementsByCoordinates({
-    modelId : this.getActiveSubmapId(),
-    coordinates : this.getActiveSubmapClickCoordinates()
-  }).then(function(elements) {
+    modelId: this.getActiveSubmapId(),
+    coordinates: this.getActiveSubmapClickCoordinates()
+  }).then(function (elements) {
     var commentDialog = self.getCommentDialog();
     if (commentDialog === undefined) {
       var div = Functions.createElement({
-        type : "div"
+        type: "div"
       });
       self.getElement().appendChild(div);
       commentDialog = new CommentDialog({
-        element : div,
-        customMap : self
+        element: div,
+        customMap: self
       });
       self.setCommentDialog(commentDialog);
     }
@@ -1087,7 +1106,7 @@ CustomMap.prototype.openCommentDialog = function() {
   });
 };
 
-CustomMap.prototype.fetchIdentifiedElements = function(elements, complete) {
+CustomMap.prototype.fetchIdentifiedElements = function (elements, complete) {
   var modelIds = [];
   var modelElements = [];
   var i;
@@ -1109,10 +1128,10 @@ CustomMap.prototype.fetchIdentifiedElements = function(elements, complete) {
 
 };
 
-CustomMap.prototype.refreshSearchAutocomplete = function() {
+CustomMap.prototype.refreshSearchAutocomplete = function () {
   var self = this;
   self._searchAutocomplete = [];
-  return ServerConnector.getSuggestedQueryList().then(function(queries) {
+  return ServerConnector.getSuggestedQueryList().then(function (queries) {
     for (var i = 0; i < queries.length; i++) {
       var mainString = queries[i];
       for (var j = 0; j < mainString.length; j++) {
@@ -1137,7 +1156,7 @@ CustomMap.prototype.refreshSearchAutocomplete = function() {
   });
 };
 
-CustomMap.prototype.getSearchAutocomplete = function(query) {
+CustomMap.prototype.getSearchAutocomplete = function (query) {
   if (this._searchAutocomplete === undefined) {
     this.refreshSearchAutocomplete();
     return [];
@@ -1146,15 +1165,15 @@ CustomMap.prototype.getSearchAutocomplete = function(query) {
   return this._searchAutocomplete[query];
 };
 
-CustomMap.prototype.setSelectedPolygon = function(polygonData) {
+CustomMap.prototype.setSelectedPolygon = function (polygonData) {
   this._selectedPolygon = polygonData;
 };
 
-CustomMap.prototype.getSelectedPolygon = function() {
+CustomMap.prototype.getSelectedPolygon = function () {
   return this._selectedPolygon;
 };
 
-CustomMap.prototype.getDistance = function(params) {
+CustomMap.prototype.getDistance = function (params) {
   var self = this;
   var ie = params.element;
   var model = self.getSubmapById(ie.getModelId()).getModel();
@@ -1164,21 +1183,21 @@ CustomMap.prototype.getDistance = function(params) {
   var x = params.coordinates.x;
   var y = params.coordinates.y;
   var p1 = new google.maps.Point(x, y);
-  return model.getByIdentifiedElement(ie).then(function(element) {
+  return model.getByIdentifiedElement(ie).then(function (element) {
     if (element instanceof Alias) {
       if (element.getX() <= x && element.getX() + element.getWidth() >= x) {
         if (element.getY() <= y && element.getY() + element.getHeight() >= y) {
           return 0;
         } else {
           return Math.min( //
-          Math.abs(element.getY() - y), //
-          Math.abs(element.getY() + element.getHeight() - y) // 
+            Math.abs(element.getY() - y), //
+            Math.abs(element.getY() + element.getHeight() - y) //
           );
         }
       } else if (element.getY() <= y && element.getY() + element.getHeight() >= y) {
         return Math.min( //
-        Math.abs(element.getX() - x), //
-        Math.abs(element.getX() + element.getWidth() - x) // 
+          Math.abs(element.getX() - x), //
+          Math.abs(element.getX() + element.getWidth() - x) //
         );
       } else {
         var elementX = element.getX();
@@ -1186,10 +1205,10 @@ CustomMap.prototype.getDistance = function(params) {
         var elementWidth = element.getWidth();
         var elementHeight = element.getHeight();
         return Math.min( //
-        Functions.distance(p1, new google.maps.Point(elementX, y)), //
-        Functions.distance(p1, new google.maps.Point(elementX + elementWidth, elementY)), //
-        Functions.distance(p1, new google.maps.Point(elementX, elementY + elementHeight)), //
-        Functions.distance(p1, new google.maps.Point(elementX + elementWidth, elementY + elementHeight)) //
+          Functions.distance(p1, new google.maps.Point(elementX, y)), //
+          Functions.distance(p1, new google.maps.Point(elementX + elementWidth, elementY)), //
+          Functions.distance(p1, new google.maps.Point(elementX, elementY + elementHeight)), //
+          Functions.distance(p1, new google.maps.Point(elementX + elementWidth, elementY + elementHeight)) //
         );
       }
     } else if (element instanceof Reaction) {
@@ -1205,7 +1224,7 @@ CustomMap.prototype.getDistance = function(params) {
   });
 };
 
-CustomMap.prototype.getSubmaps = function() {
+CustomMap.prototype.getSubmaps = function () {
   var submaps = this.submaps;
   if (submaps === undefined) {
     submaps = [];
@@ -1213,7 +1232,7 @@ CustomMap.prototype.getSubmaps = function() {
   return submaps;
 };
 
-CustomMap.prototype.destroy = function() {
+CustomMap.prototype.destroy = function () {
   var self = this;
   var commentDialog = self.getCommentDialog();
   if (commentDialog !== undefined) {
@@ -1221,11 +1240,11 @@ CustomMap.prototype.destroy = function() {
   }
 };
 
-CustomMap.prototype.getVisibleDataOverlays = function() {
+CustomMap.prototype.getVisibleDataOverlays = function () {
   var dataOverlayPromises = [];
 
   // get list of layouts
-  for ( var key in this._selectedOverlays) {
+  for (var key in this._selectedOverlays) {
     if (this._selectedOverlays.hasOwnProperty(key) && this._selectedOverlays[key] === true) {
       dataOverlayPromises.push(this.getModel().getLayoutDataById(key));
     }
@@ -1234,7 +1253,7 @@ CustomMap.prototype.getVisibleDataOverlays = function() {
   return Promise.all(dataOverlayPromises);
 };
 
-CustomMap.prototype.createMarkerForDbOverlay = function(element, dbOverlay) {
+CustomMap.prototype.createMarkerForDbOverlay = function (element, dbOverlay) {
   var self = this;
 
   var result = dbOverlay.markers[element.getType()][element.getId()];
@@ -1255,21 +1274,21 @@ CustomMap.prototype.createMarkerForDbOverlay = function(element, dbOverlay) {
     throw new Error("Unknown type of the element in overlay: " + element.type);
   }
   result = new MarkerConstructor({
-    element : element,
-    map : submap,
-    onClick : [ function() {
+    element: element,
+    map: submap,
+    onClick: [function () {
       return self._openInfoWindowForIdentifiedElement(element, result.getGoogleMarker());
-    }, function() {
+    }, function () {
       return self.callListeners("onBioEntityClick", element);
-    }, ]
+    },]
   });
-  return result.init().then(function() {
+  return result.init().then(function () {
     dbOverlay.markers[element.getType()][element.getId()] = result;
     return result;
   });
 };
 
-CustomMap.prototype.createSurfaceForDbOverlay = function(element, dbOverlay) {
+CustomMap.prototype.createSurfaceForDbOverlay = function (element, dbOverlay) {
   var self = this;
 
   var result = dbOverlay.mapOverlays[element.getType()][element.getId()];
@@ -1281,30 +1300,30 @@ CustomMap.prototype.createSurfaceForDbOverlay = function(element, dbOverlay) {
   var map = self.getSubmapById(element.getModelId());
   if (element.getType() === "ALIAS") {
     return AliasSurface.createFromIdentifiedElement({
-      element : element,
-      map : self,
-      onClick : [ function() {
+      element: element,
+      map: self,
+      onClick: [function () {
         return self.openInfoWindowForIdentifiedElement(element, result.getGoogleMarker());
-      }, function() {
+      }, function () {
         return self.callListeners("onBioEntityClick", element);
-      } ]
-    }).then(function(surface) {
+      }]
+    }).then(function (surface) {
       result = surface;
       dbOverlay.mapOverlays[element.getType()][element.getId()] = result;
       return result;
     });
   } else if (element.getType() === "REACTION") {
-    return map.getModel().getReactionById(element.getId()).then(function(reactionData) {
+    return map.getModel().getReactionById(element.getId()).then(function (reactionData) {
       var result = new ReactionSurface({
-        reaction : reactionData,
-        map : map,
-        customized : true,
-        color : element.getColor(),
-        onClick : [ function() {
+        reaction: reactionData,
+        map: map,
+        customized: true,
+        color: element.getColor(),
+        onClick: [function () {
           return self.openInfoWindowForIdentifiedElement(element, result.getGoogleMarker());
-        }, function() {
+        }, function () {
           return self.callListeners("onBioEntityClick", element);
-        } ]
+        }]
       });
       result.show();
       dbOverlay.mapOverlays[element.getType()][element.getId()] = result;
@@ -1319,21 +1338,21 @@ CustomMap.prototype.createSurfaceForDbOverlay = function(element, dbOverlay) {
 
 /**
  * Opens {@link AbstractInfoWindow} for a marker.
- * 
+ *
  * @param marker
  *          marker for which we are opening window
  */
-CustomMap.prototype._openInfoWindowForIdentifiedElement = function(element, googleMarker) {
+CustomMap.prototype._openInfoWindowForIdentifiedElement = function (element, googleMarker) {
   var self = this;
   var submap = self.getSubmapById(element.getModelId());
   if (element.getType() === "ALIAS") {
-    return submap.getModel().getByIdentifiedElement(element).then(function(alias) {
+    return submap.getModel().getByIdentifiedElement(element).then(function (alias) {
       return submap._openInfoWindowForAlias(alias, googleMarker);
     });
   } else if (element.getType() === "POINT") {
     return submap._openInfoWindowForPoint(new PointData(element), googleMarker);
   } else if (element.getType() === "REACTION") {
-    return submap.getModel().getByIdentifiedElement(element).then(function(reaction) {
+    return submap.getModel().getByIdentifiedElement(element).then(function (reaction) {
       return submap._openInfoWindowForReaction(reaction, googleMarker);
     });
   } else {
diff --git a/frontend-js/src/main/js/map/data/IdentifiedElement.js b/frontend-js/src/main/js/map/data/IdentifiedElement.js
index caa6ef2d22e5905e2006c75bb849dfdc9de85f15..727425d6611892b1f64a0fee59f72e9d816bb65a 100644
--- a/frontend-js/src/main/js/map/data/IdentifiedElement.js
+++ b/frontend-js/src/main/js/map/data/IdentifiedElement.js
@@ -3,6 +3,7 @@
 var Alias = require('./Alias');
 var LayoutAlias = require('./LayoutAlias');
 var Reaction = require('./Reaction');
+var LayoutReaction = require('./LayoutReaction');
 var PointData = require('./PointData');
 
 var logger = require('../../logger');
@@ -32,6 +33,10 @@ function IdentifiedElement(javaObject) {
     this.setId(javaObject.getId());
     this.setModelId(javaObject.getModelId());
     this.setType("REACTION");
+  } else if (javaObject instanceof LayoutReaction) {
+    this.setId(javaObject.getId());
+    this.setModelId(javaObject.getModelId());
+    this.setType("REACTION");
   } else if (javaObject instanceof PointData) {
     this.setId(javaObject.getId());
     this.setModelId(javaObject.getModelId());
@@ -77,11 +82,11 @@ function IdentifiedElement(javaObject) {
 /**
  * Returns point where it should be visualized when the type of object is
  * "POINT".
- * 
+ *
  * @returns {@linke google.maps.Point} where it should be visualized when the
  *          type of object is "POINT".
  */
-IdentifiedElement.prototype.getPoint = function() {
+IdentifiedElement.prototype.getPoint = function () {
   if (this._point === undefined || this._point === null) {
     logger.warn("No point associated with IdentifiedElement");
     return null;
@@ -92,15 +97,15 @@ IdentifiedElement.prototype.getPoint = function() {
 
 /**
  * Returns element identifier.
- * 
+ *
  * @returns element identifier
  */
-IdentifiedElement.prototype.getId = function() {
+IdentifiedElement.prototype.getId = function () {
   return this.id;
 };
 
-IdentifiedElement.prototype.setId = function(id) {
-  // some elements are identfied by id that is not a number (like point on the
+IdentifiedElement.prototype.setId = function (id) {
+  // some elements are identified by id that is not a number (like point on the
   // map)
   if (!isNaN(id)) {
     id = parseInt(id);
@@ -108,7 +113,7 @@ IdentifiedElement.prototype.setId = function(id) {
   this.id = id;
 };
 
-IdentifiedElement.prototype.setModelId = function(modelId) {
+IdentifiedElement.prototype.setModelId = function (modelId) {
   if (modelId === undefined || modelId === null) {
     throw new Error("ModelId is invalid");
   }
@@ -117,10 +122,10 @@ IdentifiedElement.prototype.setModelId = function(modelId) {
 
 /**
  * Returns model identifier where element is placed.
- * 
+ *
  * @returns model identifier
  */
-IdentifiedElement.prototype.getModelId = function() {
+IdentifiedElement.prototype.getModelId = function () {
   return this.modelId;
 };
 
@@ -132,14 +137,14 @@ IdentifiedElement.prototype.getModelId = function() {
  * <li>"POINT" - for any point on the map, the data connected to this kind of
  * objects are stored in {@link PointData}</li>
  * </ul>
- * 
+ *
  * @returns type of the element
  */
-IdentifiedElement.prototype.getType = function() {
+IdentifiedElement.prototype.getType = function () {
   return this.type;
 };
 
-IdentifiedElement.prototype.setType = function(type) {
+IdentifiedElement.prototype.setType = function (type) {
   if (type === undefined || type === null) {
     throw new Error("Type not defined");
   }
@@ -149,77 +154,77 @@ IdentifiedElement.prototype.setType = function(type) {
 
 /**
  * Returns icon that should be used for visualization.
- * 
+ *
  * @returns icon that should be used for visualization
  */
-IdentifiedElement.prototype.getIcon = function() {
+IdentifiedElement.prototype.getIcon = function () {
   return this._visualizationdata._icon;
 };
 
-IdentifiedElement.prototype.setIcon = function(icon) {
+IdentifiedElement.prototype.setIcon = function (icon) {
   this._visualizationdata._icon = icon;
 };
 
-IdentifiedElement.prototype.getColor = function() {
+IdentifiedElement.prototype.getColor = function () {
   return this._visualizationdata._color;
 };
 
-IdentifiedElement.prototype.setColor = function(color) {
+IdentifiedElement.prototype.setColor = function (color) {
   this._visualizationdata._color = color;
 };
 
-IdentifiedElement.prototype.getOpacity = function() {
+IdentifiedElement.prototype.getOpacity = function () {
   return this._visualizationdata._opacity;
 };
 
-IdentifiedElement.prototype.setOpacity = function(opacity) {
+IdentifiedElement.prototype.setOpacity = function (opacity) {
   this._visualizationdata._opacity = opacity;
 };
 
-IdentifiedElement.prototype.getLineWeight = function() {
+IdentifiedElement.prototype.getLineWeight = function () {
   return this._visualizationdata._lineWeight;
 };
 
-IdentifiedElement.prototype.setLineWeight = function(lineWeight) {
+IdentifiedElement.prototype.setLineWeight = function (lineWeight) {
   this._visualizationdata._lineWeight = lineWeight;
 };
-IdentifiedElement.prototype.getLineOpacity = function() {
+IdentifiedElement.prototype.getLineOpacity = function () {
   return this._visualizationdata._lineOpacity;
 };
 
-IdentifiedElement.prototype.setLineOpacity = function(lineOpacity) {
+IdentifiedElement.prototype.setLineOpacity = function (lineOpacity) {
   this._visualizationdata._lineOpacity = lineOpacity;
 };
-IdentifiedElement.prototype.getLineColor = function() {
+IdentifiedElement.prototype.getLineColor = function () {
   return this._visualizationdata._lineColor;
 };
 
-IdentifiedElement.prototype.setLineColor = function(lineColor) {
+IdentifiedElement.prototype.setLineColor = function (lineColor) {
   this._visualizationdata._lineColor = lineColor;
 };
 
-IdentifiedElement.prototype.getOnClickHandler = function() {
+IdentifiedElement.prototype.getOnClickHandler = function () {
   return this._visualizationdata._onClickHandler;
 };
 
-IdentifiedElement.prototype.setOnClickHandler = function(onClickHandler) {
+IdentifiedElement.prototype.setOnClickHandler = function (onClickHandler) {
   this._visualizationdata._onClickHandler = onClickHandler;
 };
 
-IdentifiedElement.prototype.equals = function(argument) {
+IdentifiedElement.prototype.equals = function (argument) {
   if (argument instanceof IdentifiedElement) {
     return (this.getType() === argument.getType() && //
-    this.getId() === argument.getId() && //
-    this.getModelId() === argument.getModelId());
+      this.getId() === argument.getId() && //
+      this.getModelId() === argument.getModelId());
   } else {
     return false;
   }
 };
 
-IdentifiedElement.prototype.toString = function() {
+IdentifiedElement.prototype.toString = function () {
   var self = this;
   return "[" + IdentifiedElement.prototype.constructor.name + "] " + self.getType() + " " + self.getId() + " (model: "
-      + self.getModelId() + ")";
+    + self.getModelId() + ")";
 };
 
 module.exports = IdentifiedElement;
diff --git a/frontend-js/src/main/js/map/data/MapModel.js b/frontend-js/src/main/js/map/data/MapModel.js
index 47a3a085e7ee0673369847cef5e36b2f3971d429..fe059bcad1102b1473ec065ed0961fdd9d406226 100644
--- a/frontend-js/src/main/js/map/data/MapModel.js
+++ b/frontend-js/src/main/js/map/data/MapModel.js
@@ -277,7 +277,7 @@ MapModel.prototype.getMissingElements = function(elements) {
 
       var reactions = layout.getReactions();
       for (var k = 0; k < reactions.length; k++) {
-        var reaction = reactions[j];
+        var reaction = reactions[k];
         if (this._reactions[reaction.getId()] === undefined && this._missingReactions[reaction.getId()] === undefined) {
           this._missingReactions[reaction.getId()] = reaction.getId();
           reactionIds.push(reaction.getId());
@@ -670,7 +670,7 @@ MapModel.prototype.getByIdentifiedElements = function(identifiedElements, comple
   return self.getMissingElements({
     aliasIds : missingAliases,
     reactionIds : missingReactions,
-    complete : true
+    complete : complete
   }).then(function() {
     var promises = [];
     for (var i = 0; i < identifiedElements.length; i++) {
@@ -687,6 +687,14 @@ MapModel.prototype.isAvailable = function(ie, complete) {
     element = this._aliases[ie.getId()];
   } else if (ie.getType() === "REACTION") {
     element = this._reactions[ie.getId()];
+  } else if (ie.getType() === "POINT") {
+    var id = this._pointToId(ie.getId());
+    var result = this._pointsData[id];
+    if (result === undefined) {
+      result = new PointData(ie);
+      this._pointsData[id] = result;
+    }
+    element = this._pointsData[id];
   } else {
     throw new Error("Unknown type: " + ie.getType(), complete);
   }
diff --git a/frontend-js/src/main/js/map/overlay/AbstractDbOverlay.js b/frontend-js/src/main/js/map/overlay/AbstractDbOverlay.js
index 57da91aee6f24955c95bc6ff1bafaa9a017d52af..6aca213bd7a5f8010fcdcc9ba4d2a8213e018402 100644
--- a/frontend-js/src/main/js/map/overlay/AbstractDbOverlay.js
+++ b/frontend-js/src/main/js/map/overlay/AbstractDbOverlay.js
@@ -41,77 +41,84 @@ AbstractDbOverlay.prototype = Object.create(ObjectWithListeners.prototype);
 AbstractDbOverlay.prototype.constructor = AbstractDbOverlay;
 
 AbstractDbOverlay.QueryType = {
-  SEARCH_BY_COORDINATES : "SEARCH_BY_COORDINATES",
-  SEARCH_BY_TARGET : "SEARCH_BY_TARGET",
-  SEARCH_BY_QUERY : "SEARCH_BY_QUERY",
+  SEARCH_BY_COORDINATES: "SEARCH_BY_COORDINATES",
+  SEARCH_BY_TARGET: "SEARCH_BY_TARGET",
+  SEARCH_BY_QUERY: "SEARCH_BY_QUERY",
 };
 
-AbstractDbOverlay.prototype.encodeQuery = function(type, arg0, arg1, arg2) {
+AbstractDbOverlay.prototype.encodeQuery = function (type, arg0, arg1, arg2) {
   if (type === AbstractDbOverlay.QueryType.SEARCH_BY_COORDINATES) {
     var modelId = arg0;
     var coordinates = arg1;
     var zoom = arg2;
     return JSON.stringify({
-      type : type,
-      modelId : modelId,
-      coordinates : coordinates,
-      zoom : zoom,
+      type: type,
+      modelId: modelId,
+      coordinates: coordinates,
+      zoom: zoom,
     });
   } else if (type === AbstractDbOverlay.QueryType.SEARCH_BY_TARGET) {
     var target = arg0;
     return JSON.stringify({
-      type : type,
-      target : target,
+      type: type,
+      target: target,
     });
   } else if (type === AbstractDbOverlay.QueryType.SEARCH_BY_QUERY) {
     var query = arg0;
     var perfect = arg1;
     return JSON.stringify({
-      type : type,
-      query : query,
-      perfect : perfect,
+      type: type,
+      query: query,
+      perfect: perfect,
     });
   } else {
     throw new Error("Unknown query type: " + type);
   }
 };
 
-AbstractDbOverlay.prototype.decodeQuery = function(query) {
+AbstractDbOverlay.prototype.decodeQuery = function (query) {
   return JSON.parse(query);
 };
 
-AbstractDbOverlay.prototype.searchByQuery = function(originalQuery, perfect, fitBounds) {
+AbstractDbOverlay.prototype.searchByQuery = function (originalQuery, perfect, fitBounds) {
   var self = this;
   var query = self.encodeQuery(AbstractDbOverlay.QueryType.SEARCH_BY_QUERY, originalQuery, perfect);
   ServerConnector.getSessionData().setQuery({
-    type : self.getName(),
-    query : query
+    type: self.getName(),
+    query: query
   });
 
-  var queries = self.splitQuery(originalQuery);
-
+  var res;
   var encodedQueries = [];
-  var promises = [];
-  for (var i = 0; i < queries.length; i++) {
-    encodedQueries.push(self.encodeQuery(AbstractDbOverlay.QueryType.SEARCH_BY_QUERY, queries[i], perfect));
-    promises.push(self.searchBySingleQuery(queries[i], perfect));
-  }
+  return self.searchBySingleQuery(originalQuery, perfect).then(function (results) {
+    if (results.length > 0) {
+      encodedQueries.push(query);
+      return [results];
+    } else {
+      var queries = self.splitQuery(originalQuery);
+
+      var promises = [];
+      for (var i = 0; i < queries.length; i++) {
+        encodedQueries.push(self.encodeQuery(AbstractDbOverlay.QueryType.SEARCH_BY_QUERY, queries[i], perfect));
+        promises.push(self.searchBySingleQuery(queries[i], perfect));
+      }
 
-  var res;
-  return Promise.all(promises).then(function(results) {
+      return Promise.all(promises);
+    }
+  }).then(function (results) {
     self.setQueries(encodedQueries);
     res = results;
     return self.callListeners('onSearch', {
-      fitBounds : fitBounds,
-      identifiedElements : res,
-      type : AbstractDbOverlay.QueryType.SEARCH_BY_QUERY,
+      fitBounds: fitBounds,
+      identifiedElements: res,
+      type: AbstractDbOverlay.QueryType.SEARCH_BY_QUERY,
     });
-  }).then(function() {
+  }).then(function () {
     return res;
   });
 };
 
-AbstractDbOverlay.prototype.searchNamesByTarget = function(element) {
+AbstractDbOverlay.prototype.searchNamesByTarget = function (element) {
   var self = this;
   var query = self.encodeQuery(AbstractDbOverlay.QueryType.SEARCH_BY_TARGET, element);
 
@@ -119,23 +126,23 @@ AbstractDbOverlay.prototype.searchNamesByTarget = function(element) {
     return Promise.resolve(self._elementsByQuery[query]);
   } else {
     return self.getNamesByTargetFromServer({
-      target : element
-    }).then(function(drugNames) {
+      target: element
+    }).then(function (drugNames) {
       self._elementsByQuery[query] = drugNames;
       return self._elementsByQuery[query];
     });
   }
 };
 
-AbstractDbOverlay.prototype.setQueries = function(queries) {
+AbstractDbOverlay.prototype.setQueries = function (queries) {
   this._queries = queries;
 };
 
-AbstractDbOverlay.prototype.getQueries = function() {
+AbstractDbOverlay.prototype.getQueries = function () {
   return this._queries;
 };
 
-AbstractDbOverlay.prototype.createIdentifiedElementsForTargetingClass = function(targetingElement, colourId) {
+AbstractDbOverlay.prototype.createIdentifiedElementsForTargetingClass = function (targetingElement, colourId) {
   var self = this;
   var result = [];
   var iconCounter = 1;
@@ -160,11 +167,11 @@ AbstractDbOverlay.prototype.createIdentifiedElementsForTargetingClass = function
   return result;
 };
 
-AbstractDbOverlay.prototype.refresh = function() {
+AbstractDbOverlay.prototype.refresh = function () {
   throw new Error("Refreshing shouldn't be called");
 };
 
-AbstractDbOverlay.prototype.searchByEncodedQuery = function(originalQuery, fitBounds) {
+AbstractDbOverlay.prototype.searchByEncodedQuery = function (originalQuery, fitBounds) {
   var query = this.decodeQuery(originalQuery);
   query.fitBounds = fitBounds;
   if (query.type === AbstractDbOverlay.QueryType.SEARCH_BY_QUERY) {
@@ -179,9 +186,9 @@ AbstractDbOverlay.prototype.searchByEncodedQuery = function(originalQuery, fitBo
   }
 };
 
-AbstractDbOverlay.prototype.clear = function() {
+AbstractDbOverlay.prototype.clear = function () {
   var self = this;
-  return self.searchByQuery("").then(function() {
+  return self.searchByQuery("").then(function () {
     return self.callListeners('onClear');
   });
 };
@@ -189,38 +196,38 @@ AbstractDbOverlay.prototype.clear = function() {
 /**
  * Returns true if overlay allows to get general data for element.
  */
-AbstractDbOverlay.prototype.allowGeneralSearch = function() {
+AbstractDbOverlay.prototype.allowGeneralSearch = function () {
   return this._allowGeneralSearch;
 };
 
-AbstractDbOverlay.prototype.getName = function() {
+AbstractDbOverlay.prototype.getName = function () {
   return this.name;
 };
 
 /**
  * Returns true if overlay allows to get data for element by search id.
  */
-AbstractDbOverlay.prototype.allowSearchById = function() {
+AbstractDbOverlay.prototype.allowSearchById = function () {
   return this._allowSearchById;
 };
 
-AbstractDbOverlay.prototype.setMap = function(map) {
+AbstractDbOverlay.prototype.setMap = function (map) {
   this._map = map;
 };
 
-AbstractDbOverlay.prototype.getMap = function() {
+AbstractDbOverlay.prototype.getMap = function () {
   return this._map;
 };
 
-AbstractDbOverlay.prototype.setName = function(name) {
+AbstractDbOverlay.prototype.setName = function (name) {
   this.name = name;
 };
 
-AbstractDbOverlay.prototype.getName = function() {
+AbstractDbOverlay.prototype.getName = function () {
   return this.name;
 };
 
-AbstractDbOverlay.prototype.setAllowSearchById = function(allowSearchById) {
+AbstractDbOverlay.prototype.setAllowSearchById = function (allowSearchById) {
   // configure if the overlay can contain detailed data about elements that
   // should be visualized in detailed mode of the Info Window
   if (typeof allowSearchById === "boolean") {
@@ -232,7 +239,7 @@ AbstractDbOverlay.prototype.setAllowSearchById = function(allowSearchById) {
   }
 };
 
-AbstractDbOverlay.prototype.setAllowGeneralSearch = function(allowGeneralSearch) {
+AbstractDbOverlay.prototype.setAllowGeneralSearch = function (allowGeneralSearch) {
   if (typeof allowGeneralSearch === "boolean") {
     this._allowGeneralSearch = allowGeneralSearch;
   } else if (allowGeneralSearch === undefined) {
@@ -242,22 +249,22 @@ AbstractDbOverlay.prototype.setAllowGeneralSearch = function(allowGeneralSearch)
   }
 };
 
-AbstractDbOverlay.prototype.setIconType = function(iconType) {
+AbstractDbOverlay.prototype.setIconType = function (iconType) {
   this._iconType = iconType;
 };
-AbstractDbOverlay.prototype.setIconStart = function(iconStart) {
+AbstractDbOverlay.prototype.setIconStart = function (iconStart) {
   this._iconStart = iconStart;
 };
 
-AbstractDbOverlay.IconColors = [ "red", "blue", "green", "purple", "yellow", "pink", "paleblue", "brown", "orange" ];
+AbstractDbOverlay.IconColors = ["red", "blue", "green", "purple", "yellow", "pink", "paleblue", "brown", "orange"];
 
-AbstractDbOverlay.prototype.getColor = function(colorId) {
+AbstractDbOverlay.prototype.getColor = function (colorId) {
   var id = colorId + this._iconStart;
   id %= AbstractDbOverlay.IconColors.length;
   return AbstractDbOverlay.IconColors[id];
 };
 
-AbstractDbOverlay.prototype.getIcon = function(colorId, id) {
+AbstractDbOverlay.prototype.getIcon = function (colorId, id) {
   if (id >= 100) {
     id = 1;
   }
@@ -265,7 +272,7 @@ AbstractDbOverlay.prototype.getIcon = function(colorId, id) {
   return "marker/" + this._iconType + "/" + this._iconType + "_" + color + "_" + id + ".png";
 };
 
-AbstractDbOverlay.prototype.splitQuery = function(query, useFullName) {
+AbstractDbOverlay.prototype.splitQuery = function (query, useFullName) {
   var result = [];
   if (query.indexOf(";") >= 0) {
     result = query.split(";");
diff --git a/frontend-js/src/test/js/helper.js b/frontend-js/src/test/js/helper.js
index caf31be8d1bfd7f3797bc413c4e50db0ab7cd638..947e0cd77818364a27696614efef19a550a9d28b 100644
--- a/frontend-js/src/test/js/helper.js
+++ b/frontend-js/src/test/js/helper.js
@@ -34,80 +34,81 @@ function Helper(configuration) {
   }
   this.setConfiguration(configuration);
   this.idCounter = 1000000;
+  this.EPSILON = Helper.EPSILON;
 }
 
-Helper.prototype.setConfiguration = function(configuration) {
+Helper.prototype.setConfiguration = function (configuration) {
   this._configuration = configuration;
 };
-Helper.prototype.getConfiguration = function() {
+Helper.prototype.getConfiguration = function () {
   return this._configuration;
 };
 
-Helper.prototype.createCommentDbOverlay = function(map) {
+Helper.prototype.createCommentDbOverlay = function (map) {
   var result = new CommentDbOverlay({
-    map : map,
-    name : "comment",
-    allowGeneralSearch : true
+    map: map,
+    name: "comment",
+    allowGeneralSearch: true
   });
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createSearchDbOverlay = function(map) {
+Helper.prototype.createSearchDbOverlay = function (map) {
   var result = new SearchDbOverlay({
-    map : map,
-    name : "search",
+    map: map,
+    name: "search",
   });
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createDbOverlay = function(map) {
+Helper.prototype.createDbOverlay = function (map) {
   var result = new AbstractDbOverlay({
-    map : map,
-    name : "search",
+    map: map,
+    name: "search",
   });
-  result.clear = function() {
+  result.clear = function () {
     logger.debug("Clear mock");
   };
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createDrugDbOverlay = function(map) {
+Helper.prototype.createDrugDbOverlay = function (map) {
   var result = new DrugDbOverlay({
-    map : map,
-    name : "drug",
-    allowGeneralSearch : true,
-    allowSearchById : true,
+    map: map,
+    name: "drug",
+    allowGeneralSearch: true,
+    allowSearchById: true,
   });
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createChemicalDbOverlay = function(map) {
+Helper.prototype.createChemicalDbOverlay = function (map) {
   var result = new ChemicalDbOverlay({
-    map : map,
-    name : "chemical",
-    allowGeneralSearch : true,
-    allowSearchById : true,
+    map: map,
+    name: "chemical",
+    allowGeneralSearch: true,
+    allowSearchById: true,
   });
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createMiRnaDbOverlay = function(map) {
+Helper.prototype.createMiRnaDbOverlay = function (map) {
   var result = new MiRnaDbOverlay({
-    map : map,
-    name : "mirna",
-    allowGeneralSearch : true,
-    allowSearchById : true,
+    map: map,
+    name: "mirna",
+    allowGeneralSearch: true,
+    allowSearchById: true,
   });
   map.registerDbOverlay(result);
   return result;
 };
 
-Helper.prototype.createComment = function(element) {
+Helper.prototype.createComment = function (element) {
   var elementType = "ALIAS";
   var elementId = this.idCounter++;
   var id = this.idCounter++;
@@ -124,25 +125,25 @@ Helper.prototype.createComment = function(element) {
   }
 
   var result = new Comment({
-    elementId : elementId,
-    type : elementType,
-    modelId : modelId,
-    icon : "icons/comment.png",
-    id : id,
-    pinned : true,
-    coord : {
-      x : 321.5,
-      y : 289.0
+    elementId: elementId,
+    type: elementType,
+    modelId: modelId,
+    icon: "icons/comment.png",
+    id: id,
+    pinned: true,
+    coord: {
+      x: 321.5,
+      y: 289.0
     },
-    removed : false,
-    title : "title fo comment: " + id,
-    content : "content of the comment # " + id
+    removed: false,
+    title: "title fo comment: " + id,
+    content: "content of the comment # " + id
   });
 
   return result;
 };
 
-Helper.prototype.createProject = function() {
+Helper.prototype.createProject = function () {
   var result = new Project();
   result.setProjectId("testId");
   result.setId(this.idCounter++);
@@ -150,17 +151,17 @@ Helper.prototype.createProject = function() {
   return result;
 };
 
-Helper.prototype.createUser = function() {
+Helper.prototype.createUser = function () {
   var result = new User({
-    login : "testlogin",
-    id : this.idCounter++,
-    name : "some name",
-    surname : "surn",
+    login: "testlogin",
+    id: this.idCounter++,
+    name: "some name",
+    surname: "surn",
   });
   return result;
 };
 
-Helper.prototype.createAlias = function(map) {
+Helper.prototype.createAlias = function (map) {
   var mapId;
   if (map === undefined) {
     mapId = this.idCounter++;
@@ -168,17 +169,17 @@ Helper.prototype.createAlias = function(map) {
     mapId = map.getId();
   }
   var result = new Alias({
-    idObject : this.idCounter++,
-    name : "Test element",
-    type : "RNA",
-    modelId : mapId,
-    bounds : {
-      x : 10.0,
-      y : 20.0,
-      width : 30.0,
-      height : 40.0,
+    idObject: this.idCounter++,
+    name: "Test element",
+    type: "RNA",
+    modelId: mapId,
+    bounds: {
+      x: 10.0,
+      y: 20.0,
+      width: 30.0,
+      height: 40.0,
     },
-    references : [],
+    references: [],
   });
   if (map !== undefined) {
     map.getModel().addAlias(result);
@@ -186,55 +187,63 @@ Helper.prototype.createAlias = function(map) {
   return result;
 };
 
-Helper.prototype.createLayoutAlias = function(alias) {
+Helper.prototype.createLayoutAlias = function (alias) {
   var id;
+  var modelId;
   if (alias instanceof Alias) {
     id = alias.getId();
+    modelId = alias.getModelId();
   } else {
     id = this.idCounter++;
+    modelId = this.idCounter++;
   }
   var result = new LayoutAlias({
-    idObject : id,
-    value : 0.2,
-    color : {
-      a : 23
+    idObject: id,
+    value: 0.2,
+    color: {
+      a: 23
     },
-    geneVariations : [ {} ]
+    modelId: modelId,
+    geneVariations: [{}]
   });
   return result;
 };
 
-Helper.prototype.createLayoutReaction = function(reaction) {
+Helper.prototype.createLayoutReaction = function (reaction) {
   var reactionId;
+  var modelId;
   if (reaction instanceof Reaction) {
     reactionId = reaction.getId();
+    modelId = reaction.getModelId();
   } else {
     reactionId = this.idCounter++;
+    modelId = this.idCounter++;
   }
 
   var result = new LayoutReaction({
-    idObject : reactionId,
-    width : 3.4,
-    color : {
-      a : 24,
+    idObject: reactionId,
+    modelId: modelId,
+    width: 3.4,
+    color: {
+      a: 24,
     },
-    reverse : true
+    reverse: true
   });
   return result;
 };
 
-Helper.prototype.createIdentifiedElement = function(element) {
+Helper.prototype.createIdentifiedElement = function (element) {
   if (element === undefined) {
     return new IdentifiedElement({
-      type : "ALIAS",
-      id : this.idCounter++,
-      modelId : this.idCounter++,
+      type: "ALIAS",
+      id: this.idCounter++,
+      modelId: this.idCounter++,
     });
   }
   return new IdentifiedElement(element);
 };
 
-Helper.prototype.createReaction = function(map) {
+Helper.prototype.createReaction = function (map) {
   var mapId = null;
   if (map !== undefined) {
     mapId = map.getId();
@@ -242,49 +251,49 @@ Helper.prototype.createReaction = function(map) {
     mapId = this.idCounter++;
   }
   var result = new Reaction({
-    idObject : this.idCounter++,
-    lines : [ {
-      start : {
-        x : 434.8904109589041,
-        y : 85.0
+    idObject: this.idCounter++,
+    lines: [{
+      start: {
+        x: 434.8904109589041,
+        y: 85.0
       },
-      end : {
-        x : 410.8341500923087,
-        y : 104.95576185524392
+      end: {
+        x: 410.8341500923087,
+        y: 104.95576185524392
       },
-      type : "START"
+      type: "START"
     }, {
-      start : {
-        x : 404.6769250286157,
-        y : 110.06345991944379
+      start: {
+        x: 404.6769250286157,
+        y: 110.06345991944379
       },
-      end : {
-        x : 380.62066416202026,
-        y : 130.0192217746877
+      end: {
+        x: 380.62066416202026,
+        y: 130.0192217746877
       },
-      type : "END"
-    } ],
-    centerPoint : new google.maps.Point(0, 0),
-    modelId : mapId,
-    references : [],
+      type: "END"
+    }],
+    centerPoint: new google.maps.Point(0, 0),
+    modelId: mapId,
+    references: [],
   });
   return result;
 };
 
-Helper.prototype.createOptions = function(project) {
+Helper.prototype.createOptions = function (project) {
   if (project === undefined) {
     project = this.createProject();
   }
 
   var options = {
-    mapDiv : testDiv,
-    element : testDiv,
-    project : project,
+    mapDiv: testDiv,
+    element: testDiv,
+    project: project,
   };
   return options;
 };
 
-Helper.prototype.createModel = function() {
+Helper.prototype.createModel = function () {
   var result = new Model();
   result.setId(this.idCounter++);
   result.setTileSize(256);
@@ -293,16 +302,16 @@ Helper.prototype.createModel = function() {
   result.setMaxZoom(8);
   result.setMinZoom(2);
   result.setCenterLatLng({
-    lat : 10,
-    lng : 20
+    lat: 10,
+    lng: 20
   });
   result.setTopLeftLatLng({
-    lat : 8,
-    lng : 8
+    lat: 8,
+    lng: 8
   });
   result.setBottomRightLatLng({
-    lat : 30,
-    lng : 30
+    lat: 30,
+    lng: 30
   });
 
   var layout = this.createLayout();
@@ -310,51 +319,51 @@ Helper.prototype.createModel = function() {
   return result;
 };
 
-Helper.prototype.createLayout = function() {
+Helper.prototype.createLayout = function () {
   var id = this.idCounter++;
   var layout = new LayoutData({
-    idObject : id,
-    name : "testLayout" + id,
+    idObject: id,
+    name: "testLayout" + id,
   });
   return layout;
 };
 
-Helper.prototype.createGoogleMap = function() {
+Helper.prototype.createGoogleMap = function () {
   var result = new google.maps.Map(testDiv, {
-    center : {
-      lat : -34.397,
-      lng : 150.644
+    center: {
+      lat: -34.397,
+      lng: 150.644
     },
-    scrollwheel : false,
-    zoom : 8
+    scrollwheel: false,
+    zoom: 8
   });
   return result;
 };
 
-Helper.prototype.createCustomMapOptions = function(project) {
+Helper.prototype.createCustomMapOptions = function (project) {
   if (project === undefined) {
     project = this.createProject();
   }
 
   var result = new CustomMapOptions({
-    markerOptimization : true,
-    project : project,
-    element : testDiv,
-    mapDiv : testDiv,
-    configuration : this.getConfiguration(),
+    markerOptimization: true,
+    project: project,
+    element: testDiv,
+    mapDiv: testDiv,
+    configuration: this.getConfiguration(),
   });
 
   return result;
 };
 
-Helper.prototype.createAbstractCustomMap = function() {
+Helper.prototype.createAbstractCustomMap = function () {
   var options = this.createCustomMapOptions();
   var result = new AbstractCustomMap(options.getProject().getModel(), options);
 
   return result;
 };
 
-Helper.prototype.createCustomMap = function(project) {
+Helper.prototype.createCustomMap = function (project) {
   if (project === null) {
     throw new Error("Project cannot be null");
   }
@@ -366,12 +375,12 @@ Helper.prototype.createCustomMap = function(project) {
 /**
  * Changes url but saves the cookies.
  */
-Helper.prototype.setUrl = function(url) {
+Helper.prototype.setUrl = function (url) {
   var cookies = Cookies.get();
   global.dom.reconfigure({
-    url : url
+    url: url
   });
-  for ( var cookie in cookies) {
+  for (var cookie in cookies) {
     Cookies.set(cookie, cookies[cookie]);
   }
   GuiConnector.init();
diff --git a/frontend-js/src/test/js/map/CustomMap-test.js b/frontend-js/src/test/js/map/CustomMap-test.js
index 3c434c3198f62fb471c0981e85acc049982341f4..ccef0aab0a0865668b57ecfe6558b6255ab7d577 100644
--- a/frontend-js/src/test/js/map/CustomMap-test.js
+++ b/frontend-js/src/test/js/map/CustomMap-test.js
@@ -116,24 +116,19 @@ describe('CustomMap', function() {
 
     it("simple", function() {
       var map = helper.createCustomMap();
-      var alias = helper.createAlias();
-      alias.setModelId(map.getId());
+      var alias = helper.createAlias(map);
       map.getModel().addAlias(alias);
 
-      var reaction = helper.createReaction();
+      var reaction = helper.createReaction(map);
       map.getModel().addReaction(reaction);
 
       var layout = helper.createLayout();
       layout.setInputDataAvailable(true);
       layout.setInitialized(true);
-      var layoutAlias = helper.createLayoutAlias();
-      layoutAlias.setId(alias.getId());
-      layoutAlias.setModelId(map.getId());
+      var layoutAlias = helper.createLayoutAlias(alias);
       layout.addAlias(layoutAlias);
 
-      var layoutReaction = helper.createLayoutReaction();
-      layoutReaction.setId(reaction.getId());
-      layoutReaction.setModelId(map.getId());
+      var layoutReaction = helper.createLayoutReaction(reaction);
       layout.addReaction(layoutReaction);
 
       map.getModel().addLayout(layout);
diff --git a/frontend-js/src/test/js/minerva-test.js b/frontend-js/src/test/js/minerva-test.js
index 6d989ae49367d46f79e121cd6197df6d322d0d2f..b09a1fa0edf2cb3a669be8f3b45b95f2af6746be 100644
--- a/frontend-js/src/test/js/minerva-test.js
+++ b/frontend-js/src/test/js/minerva-test.js
@@ -1,7 +1,5 @@
 "use strict";
 
-var Helper = require('./helper');
-
 require("./mocha-config.js");
 
 var Alias = require('../../main/js/map/data/Alias');
@@ -417,8 +415,8 @@ describe('minerva global', function() {
       var sessionData = ServerConnectorMock.getSessionData(globalResult.getProject());
       var center = sessionData.getCenter(globalResult.getProject().getModel());
       assert.ok(center instanceof google.maps.Point);
-      assert.closeTo(parseFloat(center.x), 10, Helper.EPSILON);
-      assert.closeTo(parseFloat(center.y), 20, Helper.EPSILON);
+      assert.closeTo(parseFloat(center.x), 10, helper.EPSILON);
+      assert.closeTo(parseFloat(center.y), 20, helper.EPSILON);
     }).then(function() {
       globalResult.destroy();
     });
diff --git a/frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/bioEntities/elements/329173/POST_coordinates=2.00%2C12.00&pinned=false&token=MOCK_TOKEN_ID& b/frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/bioEntities/elements/329173/POST_coordinates=2.00%2C12.00&pinned=true&token=MOCK_TOKEN_ID&
similarity index 100%
rename from frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/bioEntities/elements/329173/POST_coordinates=2.00%2C12.00&pinned=false&token=MOCK_TOKEN_ID&
rename to frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/bioEntities/elements/329173/POST_coordinates=2.00%2C12.00&pinned=true&token=MOCK_TOKEN_ID&
diff --git a/frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/points/2.00,12.00/POST_pinned=false&token=MOCK_TOKEN_ID& b/frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/points/2.00,12.00/POST_pinned=true&token=MOCK_TOKEN_ID&
similarity index 100%
rename from frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/points/2.00,12.00/POST_pinned=false&token=MOCK_TOKEN_ID&
rename to frontend-js/testFiles/apiCalls/projects/sample/comments/models/15781/points/2.00,12.00/POST_pinned=true&token=MOCK_TOKEN_ID&