-diff --git a/src/tm_mad/tm_common.sh b/src/tm_mad/tm_common.sh
-index 0f589fe..1e98122 100644
---- a/src/tm_mad/tm_common.sh
-+++ b/src/tm_mad/tm_common.sh
-@@ -145,3 +145,56 @@ function timeout_exec_and_log
-         exit $CMD_CODE
-     fi
- }
-+ 
-+function download_extract
-+{
-+    URL=$1
-+    ARCHIVE=$2
-+    FILENAME=$3
-+    HOST=$4
-+
-+    if [ "x$HOST" != "x" ]; then
-+        HOST="ssh $HOST"
-+    fi
-+
-+    $HOST curl -k -o $ARCHIVE $URL
-+
-+    extract_tar $ARCHIVE $FILENAME
-+
-+    rm -rf $ARCHIVE
-+}
-+
-+function file_ends_with
-+{
-+    FILE=$1
-+    EXTENSION=$2
-+
-+    if [ "x$(echo $FILE | grep -E $EXTENSION)" != "x" ]; then
-+        echo 0
-+    else
-+        echo 1
-+    fi
-+}
-+
-+function extract_tar
-+{
-+    ARCHIVE=$1
-+    OUTPUT=$2
-+
-+    if [ $(file_ends_with $ARCHIVE '.tar.gz') = 0 ]; then
-+        $FORMAT=z
-+    elif [ $(file_ends_with $ARCHIVE '.tar.bz2') = 0 ]; then
-+        $FORMAT=j
-+    elif [ $(file_ends_with $ARCHIVE '.tar.xz') = 0 ]; then
-+        $FORMAT=J
-+    fi
-+
-+    TAR_CMD="tar -x${FORMAT}f $ARCHIVE"
-+
-+    if [ "x$OUTPUT" != "x" ]; then
-+        $TAR_CMD -O > $OUTPUT
-+    else
-+        $TAR_CMD
-+    fi
-+}
-+
 diff --git a/src/tm_mad/nfs/tm_clone.sh b/src/tm_mad/nfs/tm_clone.sh
-index ff2ed67..603128a 100755
+index 2bba596..603128a 100755
 --- a/src/tm_mad/nfs/tm_clone.sh
 +++ b/src/tm_mad/nfs/tm_clone.sh
 @@ -44,9 +44,24 @@ exec_and_log "mkdir -p $DST_DIR"

+
+http*)
     log "Downloading $SRC"
-    exec_and_log "ssh $DST_HOST wget -O $DST_PATH $SRC"
+    exec_and_log "ssh $DST_HOST curl -k -o $DST_PATH $SRC"
     ;;
 
 *)

+
+http*)
     log "Downloading $SRC"
-    exec_and_log "$WGET -O $DST_PATH $SRC"
+    exec_and_log "curl -k -o $DST_PATH $SRC"
     ;;
 
 *)
diff --git a/src/tm_mad/ssh/tm_clone.sh b/src/tm_mad/ssh/tm_clone.sh
index 9e6ff36..b13eef2 100755
--- a/src/tm_mad/ssh/tm_clone.sh
+++ b/src/tm_mad/ssh/tm_clone.sh
@@ -43,16 +43,31 @@ log "Creating directory $DST_DIR"
 exec_and_log "$SSH $DST_HOST mkdir -p $DST_DIR"
 
 case $SRC in
-http://*)
