diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index dbaabf08114614d16ad1290f7083e9b50d665215..d2fa2682452b9643696a14710412383650ec341b 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -24,7 +24,7 @@ class project {
      * config file
      * @var string
      */
-    private $_sCfgfile = "../config/inc_projects_config.php";
+    // private $_sCfgfile = "../config/inc_projects_config.php";
 
     /**
      * directory for project configs
@@ -102,7 +102,7 @@ class project {
      * @return boolean
      */
     private function _readConfig() {
-        require(__dir__ . '/' . $this->_sCfgfile);
+        global $aConfig;
         $this->_aConfig = $aConfig;
         return true;
     }
@@ -328,14 +328,24 @@ class project {
         }
         $sInfoFile = $this->_getArchiveDir($sTimestamp) . '/' . $this->_aPrjConfig["fileprefix"] . '.json';
         $aReturn['infofile'] = $sInfoFile;
+        $sPackageFile = $this->_getArchiveDir($sTimestamp) . '/' . $this->_aPrjConfig["fileprefix"] . '.tgz';
+        $aReturn['packagefile'] = $sPackageFile;
         if (!file_exists($sInfoFile)) {
             $aReturn['error'] = sprintf(t("class-project-error-metafile-does-not-exist"), $sInfoFile);
             return $aReturn;
-        }
+        }        
         $aJson = json_decode(file_get_contents($sInfoFile), true);
         if (is_array($aJson) && array_key_exists("version", $aJson)) {
             $aReturn = array_merge($aReturn, $aJson);
             $aReturn['ok'] = 1;
+            /*
+            if (!file_exists($sPackageFile)) {
+                $aReturn['error'] = sprintf(t("class-project-error-datafile-does-not-exist"), $sInfoFile);
+            } else {
+                $aReturn['filesizes']['packagefile']=filesize($sPackageFile);
+            }
+             * 
+             */
             return $aReturn;
         }
         $aReturn['error'] = sprintf(t("class-project-error-metafile-wrong-format"), $sInfoFile);
@@ -834,22 +844,6 @@ class project {
         return $this->_sProcessTempOut;
     }
 
-    /**
-     * apply a config
-     * @param array $aConfig
-     * @return boolean
-     */
-    public function setProjectById_OLD($sId) {
-        $this->_aPrjConfig = array();
-        require(__dir__ . '/' . $this->_sCfgfile);
-        if (!array_key_exists("$sId", $aProjects)) {
-            die(sprintf(t("class-project-error-project-id-does-not-exist"), $sId));
-        }
-        $this->_aPrjConfig = $aProjects[$sId];
-        $this->_aConfig["id"] = $sId;
-        $this->_verifyConfig();
-        return true;
-    }
 
     /**
      * apply a config
@@ -857,8 +851,9 @@ class project {
      * @return boolean
      */
     public function setProjectById($sId) {
+        global $aConfig;
         $this->_aPrjConfig = array();
-        require(__dir__ . '/' . $this->_sCfgfile);
+//         require(__dir__ . '/' . $this->_sCfgfile);
         $this->_aConfig["id"] = $sId;
 
 
diff --git a/public_html/deployment/config/lang/de.json b/public_html/deployment/config/lang/de.json
index 75a531656db9dc9ca15e55729b9be035615d0a4e..4aee169d6dea13490987f417250ee67104c52cfc 100644
--- a/public_html/deployment/config/lang/de.json
+++ b/public_html/deployment/config/lang/de.json
@@ -66,6 +66,7 @@
     "class-project-error-command-failed": "Eines der Kommandos ist fehlgeschlagen (s.o.).<br>Frage ggf. den Administrator. Das Arbeitsverzeichnis &quot; %s &quot; wird f&uumlr eine Analyse nicht gel&ouml;scht.",
     "class-project-error-getPhaseInfos-package-not-found": "Die Paket-Datei (.tgz) wurde nicht gefunden: %s",
     "class-project-error-getPhaseInfos-requires-phase": "Die Methode getPhaseInfos erfordert die Angabe eine Phase.",
+    "class-project-error-datafile-does-not-exist": "Die Paket-Datei &quot;%s&quot; existiert nicht.",
     "class-project-error-metafile-does-not-exist": "Die Datei mit den Metadaten &quot;%s&quot; existiert nicht.",
     "class-project-error-metafile-has-no-version": "Die Datei mit den Metadaten &quot;%s&quot; existiert, enthält aber keine Version. <pre>%s</pre>",
     "class-project-error-metafile-wrong-format": "Die Datei mit den Metadaten &quot;%s&quot; existiert, ist aber keine JSON Datei.",
@@ -168,6 +169,7 @@
     "accept": "Accept",
     "accept-hint": "Accept Phase [%s] und in die Queue von Phase [%s] stellen.",
     "all": "alle",
+    "archive": "Archiv",
     "build": "Build",
     "build-hint": "neues Paket erstellen und in Phase [%s] stellen.",
     "build-from": "Build vom",
diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php
index ab7585283440e6954cfbf398f6d7ed3c2ec4efdc..0d8499576c9d1f4c083464c109213d2128da0aa2 100644
--- a/public_html/deployment/inc_functions.php
+++ b/public_html/deployment/inc_functions.php
@@ -10,6 +10,11 @@
   2013-11-08  Axel <axel.hahn@iml.unibe.ch>
   ###################################################################### */
 
+
+if (!isset($aConfig) || !is_array($aConfig)){
+    die("FATAL ERROR: \$aConfig does not exist. The config was not included before including ".__FILE__." in the request/ script.\n");
+}
+
 global $aParams;
 $aParams = array();
 
@@ -69,14 +74,13 @@ function aHome($sClass = "btn") {
  * @return string
  */
 function aPrjHome($sClass = "btn") {
-    global $aParams;
+    global $aParams, $aConfig;
     if (!array_key_exists("prj", $aParams))
         return false;
     if ($aParams["prj"] == "all")
         return false;
     // if (!array_key_exists("action", $aParams)) return false;
 
-    require_once("./config/inc_projects_config.php");
     require_once("./classes/project.class.php");
     $oPrj = new project($aParams["prj"]);
     return '<a href="/deployment/' . $aParams["prj"] . '/" class="' . $sClass . '"><i class="icon-book"></i> ' . t("menu-project-home") . ' <strong>' . $oPrj->getLabel() . '</strong></a>';
@@ -88,9 +92,8 @@ function aPrjHome($sClass = "btn") {
  * @return type
  */
 function getTopArea() {
-    global $aParams, $sImageBase, $aImages;
+    global $aParams, $sImageBase, $aImages, $aConfig;
     $sReturn = '';
-    require_once("./config/inc_projects_config.php");
     require_once("./classes/project.class.php");
     require_once("./classes/projectlist.class.php");
 
@@ -243,6 +246,10 @@ function getAction() {
 function t($s) {
     global $aConfig;
     static $aLang = array();
+    
+    if (!is_array($aConfig) || !array_key_exists("lang", $aConfig)){
+        die("ERROR: \$aConfig[\"lang\"] does not exist.\n");
+    }
     if (!count($aLang)) {
         $aLang = json_decode(file_get_contents(__DIR__ . "/config/lang/" . $aConfig["lang"] . ".json"), true);
     }
@@ -283,5 +290,3 @@ function enterDeployinfos() {
 
     return $sOut;
 }
-
-?>
diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php
index 71343fc264f385acf0b22d2cb36618d2e495cd5b..da611b99836904391267ef5a050364c70d1cdbc6 100644
--- a/public_html/deployment/index.php
+++ b/public_html/deployment/index.php
@@ -16,9 +16,9 @@
   2013-11-08  Axel <axel.hahn@iml.unibe.ch>
   ###################################################################### */
 
-require_once("./inc_functions.php");
 require_once("./classes/page.class.php");
 require_once("./config/inc_projects_config.php");
+require_once("./inc_functions.php");
 
 $sPrj = "";
 $sAction = "overview";
diff --git a/shellscripts/cron_deployment.php b/shellscripts/cron_deployment.php
index 46510c084b7df7b7effb518481cd298704383b65..70cd75636b1d39394ed072d27b6d5e58012f725a 100644
--- a/shellscripts/cron_deployment.php
+++ b/shellscripts/cron_deployment.php
@@ -9,6 +9,7 @@
 // http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
 
 $sDocroot = (dirname(__dir__)) . "/public_html";
+require_once("$sDocroot/deployment/config/inc_projects_config.php");
 require_once("$sDocroot/deployment/classes/project.class.php");
 
 $oPrj1 = new project();