diff --git a/CHANGELOG b/CHANGELOG
index c2676d95aba4ed7e0ebf37528b679ace16e4272e..5ddd8c6f4e09fcd6ca9040e2e1f8b6b705d83b68 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,21 @@
 minerva (11.0.0) stable; urgency=medium
 
+  * Bug fix: security issue - access to specific map can be restricted 
+    by the userlogin 
+  * Bug fix: sbgn import
+  * Bug fix: mesh connector
+  * Rest API (documentation can be found here: 
+    https://git-r3lab.uni.lu/piotr.gawron/minerva/blob/master/README.md)
+  * Selecting an element on the map shows info about it in the bottom left
+    corner (when Search tab is not open) 
+  * Upload of data overlays allows to upload just names of the proteins
+    (or other elements), it can be done via file or just by typing in the
+    proper text box 
+  * Layout changes: the main one is that there are only 3 tab panels 
+    (search, overlay, info), so it should be easier to navigate
+
+ -- Piotr Gawron <piotr.gawron@uni.lu>  Mon, 28 Aug 2017 12:00:00 +0200
+
 minerva (10.0.5) stable; urgency=medium
 
   * Bug fix: interacting drugs can be found for RNAs
diff --git a/debian/create-debian-pkg.sh b/debian/create-debian-pkg.sh
index f390d7a4080cc8f5a1a37433c3bbfd97d6f5a930..1a6936e6fc9fa7c2cd17bd88b313eb2a8acc7a19 100755
--- a/debian/create-debian-pkg.sh
+++ b/debian/create-debian-pkg.sh
@@ -49,6 +49,8 @@ gzip $SRC_DIR/minerva.txt
 #copy configuration of logrotate
 cp debian/logrotate/* $SRC_DIR/
 
+cp debian/scripts/common.sh $SRC_DIR/
+
 #copy changelog file
 cp CHANGELOG $ROOT_DIR/debian/template/changelog
 
@@ -150,22 +152,17 @@ find -name '*.ex' ! -name 'minerva*' -type f -exec rm -f {} +
 
 #our pre/post inst/rm scripts use __CURRENT_VERSION__ as a version of currently
 #installed package
-sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/preinst
-sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/postinst
-sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/prerm
-sed -i "s/__CURRENT_VERSION__/$current_version/g" debian/postrm
-
-sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/preinst
-sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/postinst
-sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/prerm
-sed -i "s/__LOG_FILE__/$LOG_FILE/g" debian/postrm
 
+sed -i "s/__CURRENT_VERSION__/$current_version/g" common.sh
+sed -i "s/__LOG_FILE__/$LOG_FILE/g" common.sh
 #__DB_SCRIPT_DIR__ in our scripts points to place where db schema files are placed
 #in the filesystem where package is installed
-sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/postinst
-sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/postrm
-sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/prerm
-sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" debian/preinst
+sed -i "s/__DB_SCRIPT_DIR__/$DB_SCRIPT_DIR/g" common.sh
+
+sed -i -e "1r common.sh" debian/postinst
+sed -i -e "1r common.sh" debian/postrm
+sed -i -e "1r common.sh" debian/preinst
+sed -i -e "1r common.sh" debian/prerm
 
 #put scripts into $DB_SCRIPT_DIR (it's a bit different than varaiable because it's not
 #escaped
diff --git a/debian/scripts/common.sh b/debian/scripts/common.sh
new file mode 100644
index 0000000000000000000000000000000000000000..951364c4390b4471b53074878ab0a731f1abd9fe
--- /dev/null
+++ b/debian/scripts/common.sh
@@ -0,0 +1,29 @@
+#file with common script functions for postrm/prerm/postinst/preinst
+log(){
+	echo "$@" >>__LOG_FILE__
+}
+LOG_FILE="__LOG_FILE__"
+
+DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
+
+#new (current) version of the package
+CURRENT_VERSION="__CURRENT_VERSION__"
+#if we update package then this will be the old version of the package
+OLD_VERSION=$2
+
+if [ "$OLD_VERSION" = "$CURRENT_VERSION" ]
+then
+	OLD_VERSION="";
+fi
+
+TOMCAT_PACKAGE="";
+TOMCAT7_OK=$(dpkg-query -W --showformat='${Status}\n' tomcat7|grep "install ok installed")
+TOMCAT8_OK=$(dpkg-query -W --showformat='${Status}\n' tomcat8|grep "install ok installed")
+if [ "$TOMCAT7_OK" != "" ];
+then
+  TOMCAT_PACKAGE='tomcat7'
+fi
+if [ "$TOMCAT8_OK" != "" ];
+then
+  TOMCAT_PACKAGE='tomcat8'
+fi
diff --git a/debian/template/control b/debian/template/control
index 25913b4c153d4c4f53324c1e96d205742ce30b35..dcb5946ab20574544cfcc59508f78714bc39af25 100644
--- a/debian/template/control
+++ b/debian/template/control
@@ -13,4 +13,4 @@ Description: Standalone web application for visualization, exploration and
  Tomcat server later to change the address.
 Section: science
 Homepage: http://r3lab.uni.lu/web/minerva-website/
-Depends: ${misc:Depends}, tomcat7, oracle-java8-set-default, postgresql (>=9.3)
+Depends: ${misc:Depends}, tomcat7 | tomcat8, oracle-java8-set-default, postgresql (>=9.3)
diff --git a/debian/template/install b/debian/template/install
index 493361aaa4fa86ab02bede0f7ff7a1f42c031491..7e81d5fb433700abf97710e8570f13708aa0b5ef 100644
--- a/debian/template/install
+++ b/debian/template/install
@@ -1 +1 @@
-minerva.war /var/lib/tomcat7/webapps
+minerva.war /usr/share/minerva/
diff --git a/debian/template/postinst b/debian/template/postinst
index a1b144da74bc63a39bcf6be638790e68c0688b04..cc4aef4bd91f2c189a8e6c14a4886400db69af53 100644
--- a/debian/template/postinst
+++ b/debian/template/postinst
@@ -13,28 +13,11 @@
 #          <conflicting-package> <version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
-log(){
-	echo "$@" >>__LOG_FILE__
-}
 log "Running postinst" $1 $2;
 
 # we execute it here because if some packages are missing then dpkg will return non-zero exit code
 set -e
 
-
-#new (current) version of the package
-CURRENT_VERSION="__CURRENT_VERSION__"
-#if we update package then this will be the old version of the package
-OLD_VERSION=$2
-
-DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
-
-if [ "$OLD_VERSION" = "$CURRENT_VERSION" ]
-then
-	OLD_VERSION="";
-fi
-
-
 case "$1" in
     configure)
     invoke-rc.d postgresql start
@@ -42,9 +25,9 @@ case "$1" in
 		#if we install
 		if [ "$OLD_VERSION" = "" ]
 		then
-			su - postgres -c "createuser -d -r -s map_viewer"  >>__LOG_FILE__ 2>>__LOG_FILE__
-			su - postgres -c "echo \"ALTER USER map_viewer WITH PASSWORD '123qweasdzxc';\"| psql"  >>__LOG_FILE__ 2>>__LOG_FILE__
-			su - postgres -c "createdb -O map_viewer map_viewer"  >>__LOG_FILE__ 2>>__LOG_FILE__
+			su - postgres -c "createuser -d -r -s map_viewer"  >>$LOG_FILE 2>>$LOG_FILE
+			su - postgres -c "echo \"ALTER USER map_viewer WITH PASSWORD '123qweasdzxc';\"| psql"  >>$LOG_FILE 2>>$LOG_FILE
+			su - postgres -c "createdb -O map_viewer map_viewer"  >>$LOG_FILE 2>>$LOG_FILE
 
 			hba_conf=`su - postgres -c "psql -t -P format=unaligned -c 'show hba_file';"`;
 			cp $hba_conf $hba_conf".bac"
@@ -53,13 +36,13 @@ case "$1" in
 	    invoke-rc.d postgresql restart
 
 			#install base version of the framework
-			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0.sql" >>__LOG_FILE__ 2>>__LOG_FILE__
+			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0.sql" >>$LOG_FILE 2>>$LOG_FILE
 			#install patch to current version
-			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0_to_$CURRENT_VERSION\".sql\"" >>__LOG_FILE__ 2>>__LOG_FILE__
+			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_0_to_$CURRENT_VERSION\".sql\"" >>$LOG_FILE 2>>$LOG_FILE
 
 		else
 			#if we update the package
-			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_$OLD_VERSION\"_to_\"$CURRENT_VERSION\".sql\""  >>__LOG_FILE__ 2>>__LOG_FILE__
+			su - postgres -c "psql map_viewer -f $DB_SCRIPT_DIR/db_$OLD_VERSION\"_to_\"$CURRENT_VERSION\".sql\""  >>$LOG_FILE 2>>$LOG_FILE
 		fi
 
 		#print a disclaimer
@@ -78,7 +61,8 @@ case "$1" in
 #we have to restart tomcat, because application was started on the old database and it might crash during deplyment
 #for instance in the new war file there was init script that uses some new database features, but they are not
 #availble when new war is deployed from debian package, so tomcat will catch SQL exception and stop deployment
-    invoke-rc.d tomcat7 restart
+    ln -s /usr/share/minerva/minerva.war /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war 
+    invoke-rc.d $TOMCAT_PACKAGE restart
     ;;
     *)
         echo "postinst called with unknown argument \`$1'" >&2
diff --git a/debian/template/postrm b/debian/template/postrm
index 1bbb913d1ea531617049d130f6a4fd0d442be495..89144fb629ef34fd3761bc2c749f6cebfcfd4840 100644
--- a/debian/template/postrm
+++ b/debian/template/postrm
@@ -7,9 +7,6 @@
 #        * <old-postrm> `upgrade' <new-version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
-log(){
-	echo "$@" >>__LOG_FILE__
-}
 
 log "Running postrm" $1 $2;
 
@@ -27,13 +24,15 @@ set -e
 
 case "$1" in
     upgrade)
-			rm -rf /var/lib/tomcat7/webapps/minerva
-			invoke-rc.d tomcat7 start || true
-			invoke-rc.d postgresql start || true
+			rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva
+			rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war
+#			invoke-rc.d $TOMCAT_PACKAGE start || true
+#			invoke-rc.d postgresql start || true
     ;;
     remove)
-			rm -rf /var/lib/tomcat7/webapps/minerva
-			invoke-rc.d tomcat7 start || true
+			rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva
+			rm -rf /var/lib/$TOMCAT_PACKAGE/webapps/minerva.war
+			invoke-rc.d $TOMCAT_PACKAGE start || true
 			if [ "" = "$POSTGRES_OK" ]
 			then
 				log "No postgresql package found.";
@@ -44,7 +43,7 @@ case "$1" in
 			fi
     ;;
 		abort-install)
-			invoke-rc.d tomcat7 start || true
+			invoke-rc.d $TOMCAT_PACKAGE start || true
 
 			if [ "" = "$POSTGRES_OK" ]; 
 			then
diff --git a/debian/template/preinst b/debian/template/preinst
index 1abc655eb13bdd0e7687c11f932d13629824dd1d..c6ad957eb6803a810a043143bf5845e16a3017ef 100644
--- a/debian/template/preinst
+++ b/debian/template/preinst
@@ -9,11 +9,6 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
-
-log(){
-	echo "$@" >>__LOG_FILE__
-}
-
 log "Running preinst" $1 $2;
 
 # we execute it here because if some packages are missing then dpkg will return non-zero exit code
@@ -29,11 +24,11 @@ ln -s $path $DEFAULT_JAVA_SYMLINK
 
 case "$1" in
     install|upgrade)
-			invoke-rc.d tomcat7 stop || true
+			invoke-rc.d $TOMCAT_PACKAGE stop || true
 			invoke-rc.d postgresql stop || true
     ;;
     abort-upgrade)
-			invoke-rc.d tomcat7 stop || true
+			invoke-rc.d $TOMCAT_PACKAGE stop || true
 			invoke-rc.d postgresql stop || true
     ;;
     *)
diff --git a/debian/template/prerm b/debian/template/prerm
index d6c80c445fb07e3c6621618992daf9ed789f71b0..c43b60f8fa2c3f996db03de69cc8b7e261d9220e 100644
--- a/debian/template/prerm
+++ b/debian/template/prerm
@@ -8,14 +8,9 @@ set -e
 #        * <new-preinst> `upgrade' <old-version>
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
-log(){
-	echo "$@" >>__LOG_FILE__
-}
 
 log "Running preinst" $1 $2;
 
-DB_SCRIPT_DIR="__DB_SCRIPT_DIR__"
-
 
 # we execute it here because if some packages are missing then dpkg will return non-zero exit code
 set -e
@@ -30,11 +25,11 @@ su - postgres -c "pg_dump map_viewer"  | gzip > "$DUMP_FILE".gz
 case "$1" in
 
     upgrade)
-			invoke-rc.d tomcat7 stop || true
+			invoke-rc.d $TOMCAT_PACKAGE stop || true
 			invoke-rc.d postgresql stop || true
     ;;
     remove)
-			invoke-rc.d tomcat7 stop || true
+			invoke-rc.d $TOMCAT_PACKAGE stop || true
 			invoke-rc.d postgresql stop || true
     ;;
     *)
diff --git a/persist/src/db/11/fix_db_20170616.sql b/persist/src/db/11.0.0/fix_db_20170616.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170616.sql
rename to persist/src/db/11.0.0/fix_db_20170616.sql
diff --git a/persist/src/db/11/fix_db_20170627.sql b/persist/src/db/11.0.0/fix_db_20170627.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170627.sql
rename to persist/src/db/11.0.0/fix_db_20170627.sql
diff --git a/persist/src/db/11/fix_db_20170628.sql b/persist/src/db/11.0.0/fix_db_20170628.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170628.sql
rename to persist/src/db/11.0.0/fix_db_20170628.sql
diff --git a/persist/src/db/11/fix_db_20170629.sql b/persist/src/db/11.0.0/fix_db_20170629.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170629.sql
rename to persist/src/db/11.0.0/fix_db_20170629.sql
diff --git a/persist/src/db/11/fix_db_20170705.sql b/persist/src/db/11.0.0/fix_db_20170705.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170705.sql
rename to persist/src/db/11.0.0/fix_db_20170705.sql
diff --git a/persist/src/db/11/fix_db_20170714.sql b/persist/src/db/11.0.0/fix_db_20170714.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170714.sql
rename to persist/src/db/11.0.0/fix_db_20170714.sql
diff --git a/persist/src/db/11/fix_db_20170725.sql b/persist/src/db/11.0.0/fix_db_20170725.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170725.sql
rename to persist/src/db/11.0.0/fix_db_20170725.sql
diff --git a/persist/src/db/11/fix_db_20170731.sql b/persist/src/db/11.0.0/fix_db_20170731.sql
similarity index 100%
rename from persist/src/db/11/fix_db_20170731.sql
rename to persist/src/db/11.0.0/fix_db_20170731.sql