diff --git a/.gitignore b/.gitignore
index 9f11b755a17d8192c60f61cb17b8902dffbd9f23..d392f0e82c4ac6dd2e7bb17eb9253e1b30d07105 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-.idea/
+*.jar
diff --git a/.travis.yml b/.travis.yml
index b730aaa8e7c65116da7c03734e802a2d8b455aa9..cb8b70de06b9c35f8d7759b565eb621c435549ca 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@
 language: java
 script:
   - set -e
-  - wget https://github.com/broadinstitute/cromwell/releases/download/31/womtool-31.jar
-  - for F in `find -name "*.wdl"`; do echo $F; java -jar womtool-31.jar validate $F; done
+  - export CROMWELL_VERSION=34
+  - wget https://github.com/broadinstitute/cromwell/releases/download/$CROMWELL_VERSION/womtool-$CROMWELL_VERSION.jar
+  - for F in $(git ls-files *.wdl); do echo $F; java -jar womtool-$CROMWELL_VERSION.jar validate $F; done
diff --git a/bioconda.wdl b/bioconda.wdl
index 0600ff72d79dc27065fbdb7b6e4db1950e37e710..e0b56b4a1df922c33015b3e357a804c338b03ca6 100644
--- a/bioconda.wdl
+++ b/bioconda.wdl
@@ -1,13 +1,17 @@
+version 1.0
 # Copyright Sequencing Analysis Support Core - Leiden University Medical Center 2017
 
 # Bioconda installs
 
 task installPrefix {
-    Array[String] requirements
-    String prefix
-    String? condaPath
-    command {
-        ${default="conda" condaPath} create \
+    input {
+        Array[String] requirements
+        String prefix
+        String? condaPath
+    }
+
+    command <<<
+        ~{default="conda" condaPath} create \
         --json -q \
         --yes \
         --override-channels \
@@ -16,8 +20,9 @@ task installPrefix {
         --channel defaults \
         --channel r \
         --prefix ${prefix} \
-        ${sep=' ' requirements}
-    }
+        ~{sep=' ' requirements}
+    >>>
+
     output {
         File condaEnvPath=prefix
         File condaJson=stdout()
diff --git a/biopet.wdl b/biopet.wdl
index 18fda742f321b20845824ac61f4758a65ed8236f..717b0f6211210c0f1a95126f56033bd4adbbd3f7 100644
--- a/biopet.wdl
+++ b/biopet.wdl
@@ -1,14 +1,19 @@
+version 1.0
+
 task BaseCounter {
-    String? preCommand
-    File? toolJar
-    File bam
-    File bamIndex
-    File refFlat
-    String outputDir
-    String prefix
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File? toolJar
+        File bam
+        File bamIndex
+        File refFlat
+        String outputDir
+        String prefix
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -17,13 +22,13 @@ task BaseCounter {
 
     command {
         set -e -o pipefail
-        mkdir -p ${outputDir}
-        ${preCommand}
-        ${toolCommand} \
-        -b ${bam} \
-        -r ${refFlat} \
-        -o ${outputDir} \
-        -p ${prefix}
+        mkdir -p ~{outputDir}
+        ~{preCommand}
+        ~{toolCommand} \
+        -b ~{bam} \
+        -r ~{refFlat} \
+        -o ~{outputDir} \
+        -p ~{prefix}
     }
 
     output {
@@ -69,20 +74,23 @@ task BaseCounter {
 }
 
 task ExtractAdaptersFastqc {
-    File? toolJar
-    String? preCommand
-    File inputFile
-    String outputDir
-    String? adapterOutputFilePath = outputDir + "/adapter.list"
-    String? contamsOutputFilePath = outputDir + "/contaminations.list"
-    Boolean? skipContams
-    File? knownContamFile
-    File? knownAdapterFile
-    Float? adapterCutoff
-    Boolean? outputAsFasta
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        File? toolJar
+        String? preCommand
+        File inputFile
+        String outputDir
+        String? adapterOutputFilePath = outputDir + "/adapter.list"
+        String? contamsOutputFilePath = outputDir + "/contaminations.list"
+        Boolean? skipContams
+        File? knownContamFile
+        File? knownAdapterFile
+        Float? adapterCutoff
+        Boolean? outputAsFasta
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -91,17 +99,17 @@ task ExtractAdaptersFastqc {
 
     command {
     set -e
-    ${preCommand}
-    mkdir -p ${outputDir}
-    ${toolCommand} \
-    --inputFile ${inputFile} \
-    ${"--adapterOutputFile " + adapterOutputFilePath } \
-    ${"--contamsOutputFile " + contamsOutputFilePath } \
-    ${"--knownContamFile " + knownContamFile} \
-    ${"--knownAdapterFile " + knownAdapterFile} \
-    ${"--adapterCutoff " + adapterCutoff} \
-    ${true="--skipContams" false="" skipContams} \
-    ${true="--outputAsFasta" false="" outputAsFasta}
+    ~{preCommand}
+    mkdir -p ~{outputDir}
+    ~{toolCommand} \
+    --inputFile ~{inputFile} \
+    ~{"--adapterOutputFile " + adapterOutputFilePath } \
+    ~{"--contamsOutputFile " + contamsOutputFilePath } \
+    ~{"--knownContamFile " + knownContamFile} \
+    ~{"--knownAdapterFile " + knownAdapterFile} \
+    ~{"--adapterCutoff " + adapterCutoff} \
+    ~{true="--skipContams" false="" skipContams} \
+    ~{true="--outputAsFasta" false="" outputAsFasta}
     }
 
     output {
@@ -117,13 +125,16 @@ task ExtractAdaptersFastqc {
 }
 
 task FastqSplitter {
-    String? preCommand
-    File inputFastq
-    Array[String] outputPaths
-    File? toolJar
+    input {
+        String? preCommand
+        File inputFastq
+        Array[String] outputPaths
+        File? toolJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
-    Float? memory
-    Float? memoryMultiplier
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -132,14 +143,14 @@ task FastqSplitter {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p $(dirname ${sep=') $(dirname ' outputPaths})
-        if [ ${length(outputPaths)} -gt 1 ]; then
-            ${toolCommand} \
-            -I ${inputFastq} \
-            -o ${sep=' -o ' outputPaths}
+        ~{preCommand}
+        mkdir -p $(dirname ~{sep=') $(dirname ' outputPaths})
+        if [ ~{length(outputPaths)} -gt 1 ]; then
+            ~{toolCommand} \
+            -I ~{inputFastq} \
+            -o ~{sep=' -o ' outputPaths}
           else
-            ln -sf ${inputFastq} ${outputPaths[0]}
+            ln -sf ~{inputFastq} ~{outputPaths[0]}
           fi
     }
 
@@ -153,17 +164,20 @@ task FastqSplitter {
 }
 
 task FastqSync {
-    String? preCommand
-    File ref1
-    File ref2
-    File in1
-    File in2
-    String out1path
-    String out2path
-    File? toolJar
-    
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File ref1
+        File ref2
+        File in1
+        File in2
+        String out1path
+        String out2path
+        File? toolJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -172,15 +186,15 @@ task FastqSync {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p $(dirname ${out1path}) $(dirname ${out2path})
-        ${toolCommand} \
-        --in1 ${in1} \
-        --in2 ${in2} \
-        --ref1 ${ref1} \
-        --ref2 ${ref2} \
-        --out1 ${out1path} \
-        --out2 ${out2path}
+        ~{preCommand}
+        mkdir -p $(dirname ~{out1path}) $(dirname ~{out2path})
+        ~{toolCommand} \
+        --in1 ~{in1} \
+        --in2 ~{in2} \
+        --ref1 ~{ref1} \
+        --ref2 ~{ref2} \
+        --out1 ~{out1path} \
+        --out2 ~{out2path}
     }
 
     output {
@@ -194,18 +208,21 @@ task FastqSync {
 }
 
 task SampleConfig {
-    File? toolJar
-    String? preCommand
-    Array[File]+ inputFiles
-    String keyFilePath
-    String? sample
-    String? library
-    String? readgroup
-    String? jsonOutputPath
-    String? tsvOutputPath
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        File? toolJar
+        String? preCommand
+        Array[File]+ inputFiles
+        String keyFilePath
+        String? sample
+        String? library
+        String? readgroup
+        String? jsonOutputPath
+        String? tsvOutputPath
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -214,16 +231,16 @@ task SampleConfig {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p . ${"$(dirname " + jsonOutputPath + ")"} ${"$(dirname " + tsvOutputPath + ")"}
-        ${toolCommand} \
-        -i ${sep="-i " inputFiles} \
-        ${"--sample " + sample} \
-        ${"--library " + library} \
-        ${"--readgroup " + readgroup} \
-        ${"--jsonOutput " + jsonOutputPath} \
-        ${"--tsvOutput " + tsvOutputPath} \
-        > ${keyFilePath}
+        ~{preCommand}
+        mkdir -p . ~{"$(dirname " + jsonOutputPath + ")"} ~{"$(dirname " + tsvOutputPath + ")"}
+        ~{toolCommand} \
+        -i ~{sep="-i " inputFiles} \
+        ~{"--sample " + sample} \
+        ~{"--library " + library} \
+        ~{"--readgroup " + readgroup} \
+        ~{"--jsonOutput " + jsonOutputPath} \
+        ~{"--tsvOutput " + tsvOutputPath} \
+        > ~{keyFilePath}
     }
 
     output {
@@ -238,16 +255,18 @@ task SampleConfig {
 }
 
 task ScatterRegions {
-    String? preCommand
-    File refFasta
-    File refDict
-    String outputDirPath
-    File? toolJar
-    Int? scatterSize
-    File? regions
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File refFasta
+        File refDict
+        String outputDirPath
+        File? toolJar
+        Int? scatterSize
+        File? regions
+
+        Float? memory
+        Float? memoryMultiplier
+    }
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -256,13 +275,13 @@ task ScatterRegions {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p ${outputDirPath}
-        ${toolCommand} \
-          -R ${refFasta} \
-          -o ${outputDirPath} \
-          ${"-s " + scatterSize} \
-          ${"-L " + regions}
+        ~{preCommand}
+        mkdir -p ~{outputDirPath}
+        ~{toolCommand} \
+          -R ~{refFasta} \
+          -o ~{outputDirPath} \
+          ~{"-s " + scatterSize} \
+          ~{"-L " + regions}
     }
 
     output {
@@ -275,12 +294,15 @@ task ScatterRegions {
 }
 
 task Seqstat {
-    String? preCommand
-    File? toolJar
-    File fastq
-    String outputFile
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File? toolJar
+        File fastq
+        String outputFile
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -289,11 +311,11 @@ task Seqstat {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p $(dirname ${outputFile})
-        ${toolCommand} \
-        --fastq ${fastq} \
-        --output ${outputFile}
+        ~{preCommand}
+        mkdir -p $(dirname ~{outputFile})
+        ~{toolCommand} \
+        --fastq ~{fastq} \
+        --output ~{outputFile}
     }
 
     output {
@@ -306,16 +328,19 @@ task Seqstat {
 }
 
 task ValidateAnnotation {
-    String? preCommand
-    File? toolJar
-    File? refRefflat
-    File? gtfFile
-    File refFasta
-    File refFastaIndex
-    File refDict
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File? toolJar
+        File? refRefflat
+        File? gtfFile
+        File refFasta
+        File refFastaIndex
+        File refDict
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -324,11 +349,11 @@ task ValidateAnnotation {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
-        ${"-r " + refRefflat} \
-        ${"-g " + gtfFile} \
-        -R ${refFasta}
+        ~{preCommand}
+        ~{toolCommand} \
+        ~{"-r " + refRefflat} \
+        ~{"-g " + gtfFile} \
+        -R ~{refFasta}
     }
 
     output {
@@ -341,13 +366,16 @@ task ValidateAnnotation {
 }
 
 task ValidateFastq {
-    String? preCommand
-    File? toolJar
-    File fastq1
-    File? fastq2
+    input {
+        String? preCommand
+        File? toolJar
+        File fastq1
+        File? fastq2
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
-    Float? memory
-    Float? memoryMultiplier
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -356,10 +384,10 @@ task ValidateFastq {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
-        --fastq1 ${fastq1} \
-        ${"--fastq2 " + fastq2}
+        ~{preCommand}
+        ~{toolCommand} \
+        --fastq1 ~{fastq1} \
+        ~{"--fastq2 " + fastq2}
     }
 
     output {
@@ -372,16 +400,19 @@ task ValidateFastq {
 }
 
 task ValidateVcf {
-    String? preCommand
-    File? toolJar
-    File vcfFile
-    File vcfIndex
-    File refFasta
-    File refFastaIndex
-    File refDict
-
-    Float? memory
-    Float? memoryMultiplier
+    input{
+        String? preCommand
+        File? toolJar
+        File vcfFile
+        File vcfIndex
+        File refFasta
+        File refFastaIndex
+        File refDict
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(toolJar)
@@ -390,10 +421,10 @@ task ValidateVcf {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
-        -i ${vcfFile} \
-        -R ${refFasta}
+        ~{preCommand}
+        ~{toolCommand} \
+        -i ~{vcfFile} \
+        -R ~{refFasta}
     }
 
     output {
diff --git a/bwa.wdl b/bwa.wdl
index 440b6559b2fcceaa0efaebfdeddd35b46da07d5a..d012b38ea8e94bcd4d54e992cd43315e6df3ddb5 100644
--- a/bwa.wdl
+++ b/bwa.wdl
@@ -1,28 +1,32 @@
-task mem {
-    String? preCommand
-    File inputR1
-    File? inputR2
-    File referenceFasta
-    Array[File] indexFiles # These indexFiles need to be added, otherwise cromwell will not find them.
-    String outputPath
-    String? readgroup
+version 1.0
 
-    Int? threads
-    Int? memory
+task mem {
+    input {
+        String? preCommand
+        File inputR1
+        File? inputR2
+        File referenceFasta
+        Array[File] indexFiles # These indexFiles need to be added, otherwise cromwell will not find them.
+        String outputPath
+        String? readgroup
 
+        Int? threads
+        Int? memory
+    }
 
     command {
         set -e -o pipefail
-        mkdir -p $(dirname ${outputPath})
-        ${preCommand}
-        bwa mem ${"-t " + threads} \
-        ${"-R '" + readgroup + "'"} \
-        ${referenceFasta} ${inputR1} ${inputR2} | samtools sort --output-fmt BAM - > ${outputPath}
+        mkdir -p $(dirname ~{outputPath})
+        ~{preCommand}
+        bwa mem ~{"-t " + threads} \
+        ~{"-R '" + readgroup + "'"} \
+        ~{referenceFasta} ~{inputR1} ~{inputR2} | samtools sort --output-fmt BAM - > ~{outputPath}
     }
 
     output {
         File bamFile = outputPath
     }
+
     runtime{
         cpu: select_first([threads,1])
         memory: select_first([memory,8])
@@ -30,32 +34,36 @@ task mem {
 }
 
 task index {
-    File fasta
-    String? preCommand
-    String? constructionAlgorithm
-    Int? blockSize
-    String? outputDir
+    input {
+        File fasta
+        String? preCommand
+        String? constructionAlgorithm
+        Int? blockSize
+        String? outputDir
+    }
+
     String fastaFilename = basename(fasta)
     String outputFile = if (defined(outputDir)) then outputDir + "/" + fastaFilename else fasta
 
     command {
         set -e -o pipefail
-        ${"mkdir -p " + outputDir}
-        ${preCommand}
-        if [[ ! '${outputDir}' =  '' ]]
+        ~{"mkdir -p " + outputDir}
+        ~{preCommand}
+        if [[ ! '~{outputDir}' =  '' ]]
         then
-            ln -sf ${fasta} ${outputDir + "/"}${fastaFilename}
+            ln -sf ~{fasta} ~{outputDir + "/"}~{fastaFilename}
         fi
         bwa index \
-        ${"-a " + constructionAlgorithm} \
-        ${"-b" + blockSize} \
-        ${outputFile}
+        ~{"-a " + constructionAlgorithm} \
+        ~{"-b" + blockSize} \
+        ~{outputFile}
     }
 
     output {
         File indexedFasta = outputFile
         Array[File] indexFiles = [outputFile + ".bwt",outputFile + ".pac",outputFile + ".sa",outputFile + ".amb",outputFile + ".ann"]
     }
+
     parameter_meta {
         fasta: "Fasta file to be indexed"
         constructionAlgorithm: "-a STR    BWT construction algorithm: bwtsw, is or rb2 [auto]"
diff --git a/centrifuge.wdl b/centrifuge.wdl
index f466fe3b53c380077fb61cccc12354c2b0cc06a5..a6659775f49748069a5f06ccec9961d938d549a0 100644
--- a/centrifuge.wdl
+++ b/centrifuge.wdl
@@ -1,55 +1,59 @@
+version 1.0
 # Copyright Sequencing Analysis Support Core - Leiden University Medical Center 2018
 #
 # Tasks from centrifuge
 task Build {
-    File conversionTable
-    File taxonomyTree
-    File inputFasta
-    String centrifugeIndexBase
-    String? preCommand
-    String? centrifugeBuildExecutable = "centrifuge-build"
-    #Boolean? c = false
-    Boolean? largeIndex = false
-    Boolean? noAuto = false
-    Int? bMax
-    Int? bMaxDivn
-    Boolean? noDiffCover = false
-    Boolean? noRef = false
-    Boolean? justRef = false
-    Int? offRate
-    Int? fTabChars
-    File? nameTable
-    File? sizeTable
-    Int? seed
-    Int? kmerCount
-
-    Int? threads
-    Int? memory
+    input {
+        File conversionTable
+        File taxonomyTree
+        File inputFasta
+        String centrifugeIndexBase
+        String? preCommand
+        String? centrifugeBuildExecutable = "centrifuge-build"
+        #Boolean? c = false
+        Boolean? largeIndex = false
+        Boolean? noAuto = false
+        Int? bMax
+        Int? bMaxDivn
+        Boolean? noDiffCover = false
+        Boolean? noRef = false
+        Boolean? justRef = false
+        Int? offRate
+        Int? fTabChars
+        File? nameTable
+        File? sizeTable
+        Int? seed
+        Int? kmerCount
+
+        Int? threads
+        Int? memory
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
-        ${centrifugeBuildExecutable} \
-        ${true='--large-index' false='' largeIndex} \
-        ${true='--noauto' false='' noAuto} \
-        ${'--bmax ' + bMax} \
-        ${'--bmaxdivn ' + bMaxDivn} \
-        ${true='--nodc' false='' noDiffCover} \
-        ${true='--noref' false='' noRef} \
-        ${true='--justref' false='' justRef} \
-        ${'--offrate ' + offRate} \
-        ${'--ftabchars ' + fTabChars} \
-        ${'--name-table ' + nameTable } \
-        ${'--size-table ' + sizeTable} \
-        ${'--seed ' + seed} \
-        ${'--kmer-count' + kmerCount} \
-        ${'--threads ' + threads} \
-        --conversion-table ${conversionTable} \
-        --taxonomy-tree ${taxonomyTree} \
-        ${inputFasta} \
-        ${centrifugeIndexBase}
+        ~{preCommand}
+        ~{"mkdir -p $(dirname " + centrifugeIndexBase + ")"}
+        ~{centrifugeBuildExecutable} \
+        ~{true='--large-index' false='' largeIndex} \
+        ~{true='--noauto' false='' noAuto} \
+        ~{'--bmax ' + bMax} \
+        ~{'--bmaxdivn ' + bMaxDivn} \
+        ~{true='--nodc' false='' noDiffCover} \
+        ~{true='--noref' false='' noRef} \
+        ~{true='--justref' false='' justRef} \
+        ~{'--offrate ' + offRate} \
+        ~{'--ftabchars ' + fTabChars} \
+        ~{'--name-table ' + nameTable } \
+        ~{'--size-table ' + sizeTable} \
+        ~{'--seed ' + seed} \
+        ~{'--kmer-count' + kmerCount} \
+        ~{'--threads ' + threads} \
+        --conversion-table ~{conversionTable} \
+        --taxonomy-tree ~{taxonomyTree} \
+        ~{inputFasta} \
+        ~{centrifugeIndexBase}
     }
+
     runtime {
         cpu: select_first([threads, 8])
         memory: select_first([memory, 20])
@@ -57,49 +61,53 @@ task Build {
 }
 
 task Classify {
-    String outputDir
-    Boolean? compressOutput = true
-    String? preCommand
-    String indexPrefix
-    Array[File]? unpairedReads
-    Array[File]+ read1
-    Array[File]? read2
-    Boolean? fastaInput
-    # Variables for handling output
+    input {
+        String outputDir
+        Boolean? compressOutput = true
+        String? preCommand
+        String indexPrefix
+        Array[File]? unpairedReads
+        Array[File]+ read1
+        Array[File]? read2
+        Boolean? fastaInput
+        # Variables for handling output
+
+        String? metFilePath # If this is specified, the report file is empty
+        Int? assignments
+        Int? minHitLen
+        Int? minTotalLen
+        Array[String]? hostTaxIds
+        Array[String]? excludeTaxIds
+
+        Int? threads
+        Int? memory
+    }
+
     String outputFilePath = outputDir + "/centrifuge.out"
     String reportFilePath = outputDir + "/centrifuge_report.tsv"
     String finalOutputPath = if (compressOutput == true)
             then outputFilePath + ".gz"
             else outputFilePath
-    String? metFilePath # If this is specified, the report file is empty
-    Int? assignments
-    Int? minHitLen
-    Int? minTotalLen
-    Array[String]? hostTaxIds
-    Array[String]? excludeTaxIds
-
-    Int? threads
-    Int? memory
 
     command {
         set -e -o pipefail
-        mkdir -p ${outputDir}
-        ${preCommand}
+        mkdir -p ~{outputDir}
+        ~{preCommand}
         centrifuge \
-        ${"-p " + select_first([threads, 4])} \
-        ${"-x " + indexPrefix} \
-        ${true="-f" false="" fastaInput} \
-        ${true="-k" false="" defined(assignments)} ${assignments} \
-        ${true="-1" false="-U" defined(read2)} ${sep=',' read1} \
-        ${true="-2" false="" defined(read2)} ${sep=',' read2} \
-        ${true="-U" false="" defined(unpairedReads)} ${sep=',' unpairedReads} \
-        ${"--report-file " + reportFilePath} \
-        ${"--min-hitlen " + minHitLen} \
-        ${"--min-totallen " + minTotalLen} \
-        ${"--met-file " + metFilePath} \
-        ${true="--host-taxids " false="" defined(hostTaxIds)} ${sep=',' hostTaxIds} \
-        ${true="--exclude-taxids " false="" defined(excludeTaxIds)} ${sep=',' excludeTaxIds} \
-        ${true="| gzip -c >" false="-S" compressOutput} ${finalOutputPath}
+        ~{"-p " + select_first([threads, 4])} \
+        ~{"-x " + indexPrefix} \
+        ~{true="-f" false="" fastaInput} \
+        ~{true="-k" false="" defined(assignments)} ~{assignments} \
+        ~{true="-1" false="-U" defined(read2)} ~{sep=',' read1} \
+        ~{true="-2" false="" defined(read2)} ~{sep=',' read2} \
+        ~{true="-U" false="" defined(unpairedReads)} ~{sep=',' unpairedReads} \
+        ~{"--report-file " + reportFilePath} \
+        ~{"--min-hitlen " + minHitLen} \
+        ~{"--min-totallen " + minTotalLen} \
+        ~{"--met-file " + metFilePath} \
+        ~{true="--host-taxids " false="" defined(hostTaxIds)} ~{sep=',' hostTaxIds} \
+        ~{true="--exclude-taxids " false="" defined(excludeTaxIds)} ~{sep=',' excludeTaxIds} \
+        ~{true="| gzip -c >" false="-S" compressOutput} ~{finalOutputPath}
     }
 
     output {
@@ -114,58 +122,61 @@ task Classify {
 }
 
 task Download {
-    String libraryPath
-    Array[String]? domain
-    String? executable = "centrifuge-download"
-    String? preCommand
-    String? seqTaxMapPath
-    String? database = "refseq"
-    String? assemblyLevel
-    String? refseqCategory
-    Array[String]? taxIds
-    Boolean? filterUnplaced = false
-    Boolean? maskLowComplexRegions = false
-    Boolean? downloadRnaSeqs = false
-    Boolean? modifyHeader = false
-    Boolean? downloadGiMap = false
+    input {
+        String libraryPath
+        Array[String]? domain
+        String? executable = "centrifuge-download"
+        String? preCommand
+        String? seqTaxMapPath
+        String? database = "refseq"
+        String? assemblyLevel
+        String? refseqCategory
+        Array[String]? taxIds
+        Boolean? filterUnplaced = false
+        Boolean? maskLowComplexRegions = false
+        Boolean? downloadRnaSeqs = false
+        Boolean? modifyHeader = false
+        Boolean? downloadGiMap = false
+    }
 
     # This will use centrifuge-download to download.
     # The bash statement at the beginning is to make sure
     # the directory for the SeqTaxMapPath exists.
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${"mkdir -p $(dirname " + seqTaxMapPath + ")"}
-        ${executable} \
-        -o ${libraryPath} \
-        ${true='-d ' false='' defined(domain)}${sep=','  domain} \
-        ${'-a "' + assemblyLevel + '"'} \
-        ${"-c " + refseqCategory} \
-        ${true='-t' false='' defined(taxIds)} '${sep=',' taxIds}' \
-        ${true='-r' false='' downloadRnaSeqs} \
-        ${true='-u' false='' filterUnplaced} \
-        ${true='-m' false='' maskLowComplexRegions} \
-        ${true='-l' false='' modifyHeader} \
-        ${true='-g' false='' downloadGiMap} \
-        ${database} ${">> " + seqTaxMapPath}
+        ~{preCommand}
+        ~{"mkdir -p $(dirname " + seqTaxMapPath + ")"}
+        ~{executable} \
+        -o ~{libraryPath} \
+        ~{true='-d ' false='' defined(domain)}~{sep=','  domain} \
+        ~{'-a "' + assemblyLevel + '"'} \
+        ~{"-c " + refseqCategory} \
+        ~{true='-t' false='' defined(taxIds)} '~{sep=',' taxIds}' \
+        ~{true='-r' false='' downloadRnaSeqs} \
+        ~{true='-u' false='' filterUnplaced} \
+        ~{true='-m' false='' maskLowComplexRegions} \
+        ~{true='-l' false='' modifyHeader} \
+        ~{true='-g' false='' downloadGiMap} \
+        ~{database} ~{">> " + seqTaxMapPath}
     }
     output {
-        File seqTaxMap = "${seqTaxMapPath}"
+        File seqTaxMap = "~{seqTaxMapPath}"
         File library = libraryPath
         Array[File] fastaFiles = glob(libraryPath + "/*/*.fna")
     }
  }
 
 task DownloadTaxonomy {
-    String centrifugeTaxonomyDir
-    String? executable = "centrifuge-download"
-    String? preCommand
-
+    input {
+        String centrifugeTaxonomyDir
+        String? executable = "centrifuge-download"
+        String? preCommand
+    }
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${executable} \
-        -o ${centrifugeTaxonomyDir} \
+        ~{preCommand}
+        ~{executable} \
+        -o ~{centrifugeTaxonomyDir} \
         taxonomy
     }
 
@@ -176,36 +187,38 @@ task DownloadTaxonomy {
  }
 
 task Kreport {
-    String? preCommand
-    File centrifugeOut
-    Boolean inputIsCompressed
-    String outputDir
-    String? suffix = "kreport"
-    String? prefix = "centrifuge"
-    String kreportFilePath = outputDir + "/" + prefix + "." + suffix
-    String indexPrefix
-    Boolean? onlyUnique
-    Boolean? showZeros
-    Boolean? isCountTable
-    Int? minScore
-    Int? minLength
-
-    Int? cores
-    Int? memory
+    input {
+        String? preCommand
+        File centrifugeOut
+        Boolean inputIsCompressed
+        String outputDir
+        String? suffix = "kreport"
+        String? prefix = "centrifuge"
+        String indexPrefix
+        Boolean? onlyUnique
+        Boolean? showZeros
+        Boolean? isCountTable
+        Int? minScore
+        Int? minLength
+
+        Int? cores
+        Int? memory
+    }
 
+    String kreportFilePath = outputDir + "/" + prefix + "." + suffix
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
         centrifuge-kreport \
-        -x ${indexPrefix} \
-        ${true="--only-unique" false="" onlyUnique} \
-        ${true="--show-zeros" false="" showZeros} \
-        ${true="--is-count-table" false="" isCountTable} \
-        ${"--min-score " + minScore} \
-        ${"--min-length " + minLength} \
-        ${true="<(zcat" false="" inputIsCompressed} ${centrifugeOut}\
-        ${true=")" false="" inputIsCompressed} \
-        > ${kreportFilePath}
+        -x ~{indexPrefix} \
+        ~{true="--only-unique" false="" onlyUnique} \
+        ~{true="--show-zeros" false="" showZeros} \
+        ~{true="--is-count-table" false="" isCountTable} \
+        ~{"--min-score " + minScore} \
+        ~{"--min-length " + minLength} \
+        ~{true="<(zcat" false="" inputIsCompressed} ~{centrifugeOut}\
+        ~{true=")" false="" inputIsCompressed} \
+        > ~{kreportFilePath}
     }
 
     output {
diff --git a/common.wdl b/common.wdl
index 863421dc299425d62291943b585e58f457caf861..581553ad71957985b0e3fa5541c6d0f3f26c122f 100644
--- a/common.wdl
+++ b/common.wdl
@@ -1,10 +1,14 @@
+version 1.0
+
 task AppendToStringArray {
-    Array[String] array
-    String string
+    input {
+        Array[String] array
+        String string
+    }
 
     command {
-        echo "${sep='\n' array}
-        ${string}"
+        echo "~{sep='\n' array}
+        ~{string}"
     }
 
     output {
@@ -18,27 +22,31 @@ task AppendToStringArray {
 
 # This task will fail if the MD5sum doesn't match the file.
 task CheckFileMD5 {
-    File file
-    String MD5sum
+    input {
+        File file
+        String MD5sum
+    }
 
     command {
         set -e -o pipefail
-        MD5SUM=$(md5sum ${file} | cut -d ' ' -f 1)
-        [ $MD5SUM = ${MD5sum} ]
+        MD5SUM=$(md5sum ~{file} | cut -d ' ' -f 1)
+        [ $MD5SUM = ~{MD5sum} ]
     }
 }
 
 task ConcatenateTextFiles {
-    Array[File] fileList
-    String combinedFilePath
-    Boolean? unzip = false
-    Boolean? zip = false
+    input {
+        Array[File] fileList
+        String combinedFilePath
+        Boolean? unzip = false
+        Boolean? zip = false
+    }
 
     command {
         set -e -o pipefail
-        ${"mkdir -p $(dirname " + combinedFilePath + ")"}
-        ${true='zcat' false= 'cat' unzip} ${sep=' ' fileList} \
-        ${true="| gzip -c" false="" zip} > ${combinedFilePath}
+        ~{"mkdir -p $(dirname " + combinedFilePath + ")"}
+        ~{true='zcat' false= 'cat' unzip} ~{sep=' ' fileList} \
+        ~{true="| gzip -c" false="" zip} > ~{combinedFilePath}
     }
 
     output {
@@ -53,11 +61,13 @@ task ConcatenateTextFiles {
 task CreateLink {
     # Making this of type File will create a link to the copy of the file in the execution
     # folder, instead of the actual file.
-    String inputFile
-    String outputPath
+    input {
+        String inputFile
+        String outputPath
+    }
 
     command {
-        ln -sf ${inputFile} ${outputPath}
+        ln -sf ~{inputFile} ~{outputPath}
     }
 
     output {
@@ -65,29 +75,17 @@ task CreateLink {
     }
 }
 
-# inspired by https://gatkforums.broadinstitute.org/wdl/discussion/9616/is-there-a-way-to-flatten-arrays
-task FlattenStringArray {
-    Array[Array[String]] arrayList
-
-    command {
-        for line in $(echo ${sep=', ' arrayList}) ; \
-        do echo $line | tr -d '"[],' ; done
-    }
-
-    output {
-        Array[String] flattenedArray = read_lines(stdout())
-    }
-
-    runtime {
-        memory: 1
-    }
-}
+# DEPRECATED. USE BUILT-IN FLATTEN FUNCTION
+# task FlattenStringArray {}
+# Commented out to let pipelines that depend on this fail.
 
 task MapMd5 {
-    Map[String,String] map
+    input {
+        Map[String,String] map
+    }
 
     command {
-        cat ${write_map(map)} | md5sum - | sed -e 's/  -//'
+        cat ~{write_map(map)} | md5sum - | sed -e 's/  -//'
     }
 
     output {
@@ -101,10 +99,12 @@ task MapMd5 {
 
 
 task ObjectMd5 {
-    Object the_object
+    input {
+        Object the_object
+    }
 
     command {
-        cat ${write_object(the_object)} |  md5sum - | sed -e 's/  -//'
+        cat ~{write_object(the_object)} |  md5sum - | sed -e 's/  -//'
     }
 
     output {
@@ -117,11 +117,13 @@ task ObjectMd5 {
 }
 
 task StringArrayMd5 {
-    Array[String] stringArray
+    input {
+        Array[String] stringArray
+    }
 
     command {
         set -eu -o pipefail
-        echo ${sep=',' stringArray} | md5sum - | sed -e 's/  -//'
+        echo ~{sep=',' stringArray} | md5sum - | sed -e 's/  -//'
     }
 
     output {
diff --git a/cutadapt.wdl b/cutadapt.wdl
index 3f16d1476c633b4ed479edc1daa45c268daf546e..4a09e0dd144013cceec4f13b92ed180e77e0a51b 100644
--- a/cutadapt.wdl
+++ b/cutadapt.wdl
@@ -1,109 +1,114 @@
+version 1.0
+
 task cutadapt {
-    File read1
-    File? read2
-    String read1output
-    String? read2output
-    String? format
-    String? preCommand
-    Int? cores = 1
-    Int? memory = 4
-    Array[String]+? adapter
-    Array[String]+? front
-    Array[String]+? anywhere
-    Array[String]+? adapterRead2
-    Array[String]+? frontRead2
-    Array[String]+? anywhereRead2
-    Boolean? interleaved
-    String? pairFilter
-    Float? errorRate
-    Boolean? noIndels
-    Int? times
-    Int? overlap
-    Boolean? matchReadWildcards
-    Boolean? noMatchAdapterWildcards
-    Boolean? noTrim
-    Boolean? maskAdapter
-    Int? cut
-    String? nextseqTrim
-    String? qualityCutoff
-    Int? qualityBase
-    Int? length
-    Boolean? trimN
-    String? lengthTag
-    String? stripSuffix
-    String? prefix
-    String? suffix
-    Int? minimumLength = 1  # Necessary to prevent creation of empty reads
-    Int? maximumLength
-    Int? maxN
-    Boolean? discardTrimmed
-    Boolean? discardUntrimmed
-    String? infoFilePath
-    String? restFilePath
-    String? wildcardFilePath
-    String? tooShortOutputPath
-    String? tooLongOutputPath
-    String? untrimmedOutputPath
-    String? tooShortPairedOutputPath
-    String? tooLongPairedOutputPath
-    String? untrimmedPairedOutputPath
-    Boolean? colorspace
-    Boolean? doubleEncode
-    Boolean? trimPrimer
-    Boolean? stripF3
-    Boolean? maq
-    Boolean? bwa
-    Boolean? zeroCap
-    Boolean? noZeroCap
-    String? reportPath
+    input {
+        File read1
+        File? read2
+        String read1output
+        String? read2output
+        String? format
+        String? preCommand
+        Int? cores = 1
+        Int? memory = 4
+        Array[String]+? adapter
+        Array[String]+? front
+        Array[String]+? anywhere
+        Array[String]+? adapterRead2
+        Array[String]+? frontRead2
+        Array[String]+? anywhereRead2
+        Boolean? interleaved
+        String? pairFilter
+        Float? errorRate
+        Boolean? noIndels
+        Int? times
+        Int? overlap
+        Boolean? matchReadWildcards
+        Boolean? noMatchAdapterWildcards
+        Boolean? noTrim
+        Boolean? maskAdapter
+        Int? cut
+        String? nextseqTrim
+        String? qualityCutoff
+        Int? qualityBase
+        Int? length
+        Boolean? trimN
+        String? lengthTag
+        String? stripSuffix
+        String? prefix
+        String? suffix
+        Int? minimumLength = 1  # Necessary to prevent creation of empty reads
+        Int? maximumLength
+        Int? maxN
+        Boolean? discardTrimmed
+        Boolean? discardUntrimmed
+        String? infoFilePath
+        String? restFilePath
+        String? wildcardFilePath
+        String? tooShortOutputPath
+        String? tooLongOutputPath
+        String? untrimmedOutputPath
+        String? tooShortPairedOutputPath
+        String? tooLongPairedOutputPath
+        String? untrimmedPairedOutputPath
+        Boolean? colorspace
+        Boolean? doubleEncode
+        Boolean? trimPrimer
+        Boolean? stripF3
+        Boolean? maq
+        Boolean? bwa
+        Boolean? zeroCap
+        Boolean? noZeroCap
+        String? reportPath
+    }
 
     command {
         set -e -o pipefail
-        ${"mkdir -p $(dirname " + read1output + ")"}
-        ${"mkdir -p $(dirname " + read2output + ")"}
-        ${"mkdir -p $(dirname " + reportPath + ")"}
-        ${preCommand}
+        ~{"mkdir -p $(dirname " + read1output + ")"}
+        ~{"mkdir -p $(dirname " + read2output + ")"}
+        ~{"mkdir -p $(dirname " + reportPath + ")"}
+        ~{preCommand}
         cutadapt \
-        ${"--cores=" + cores} \
-        ${true="-a " false="" defined(adapter)} ${sep=" -a " adapter} \
-        ${true="-A " false="" defined(adapterRead2)} ${sep=" -A " adapterRead2} \
-        ${true="-g " false="" defined(front)} ${sep=" -g " front} \
-        ${true="-G " false="" defined(frontRead2)} ${sep=" -G " frontRead2} \
-        ${true="-b " false="" defined(anywhere)} ${sep=" -b " anywhere} \
-        ${true="-B " false="" defined(anywhereRead2)} ${sep=" -B " anywhereRead2} \
-        --output ${read1output} ${"--paired-output " + read2output} \
-        ${"--to-short-output " + tooShortOutputPath} ${"--to-short-paired-output " + tooShortPairedOutputPath} \
-        ${"--to-long-output " + tooLongOutputPath} ${"--to-long-paired-output " + tooLongPairedOutputPath} \
-        ${"--untrimmed-output " + untrimmedOutputPath} ${"--untrimmed-paired-output " + untrimmedPairedOutputPath} \
-        ${"--pair-filter " + pairFilter} \
-        ${"--error-rate " + errorRate} \
-        ${"--times " + times} \
-        ${"--overlap " + overlap} \
-        ${"--cut " + cut} \
-        ${"--nextseq-trim " + nextseqTrim} \
-        ${"--quality-cutoff " + qualityCutoff} \
-        ${"--quality-base " + qualityBase} \
-        ${"--length " + length} \
-        ${"--length-tag " + lengthTag} \
-        ${"--strip-suffix " + stripSuffix} \
-        ${"--prefix " + prefix} \
-        ${"--suffix " + suffix} \
-        ${"--minimum-length " + minimumLength} \
-        ${"--maximum-length " + maximumLength} \
-        ${"--max-n " + maxN} \
-        ${true="--discard-untrimmed" false="" discardUntrimmed} \
-        ${"--info-file " + infoFilePath } \
-        ${"--rest-file " + restFilePath } \
-        ${"--wildcard-file " + wildcardFilePath} \
-        ${true="--match-read-wildcards" false="" matchReadWildcards} ${true="--no-match-adapter-wildcards" false="" noMatchAdapterWildcards} \
-        ${true="--no-trim" false="" noTrim} ${true="--mask-adapter" false="" maskAdapter} \
-        ${true="--no-indels" false="" noIndels} ${true="--trim-n" false="" trimN}  \
-        ${true="--interleaved" false="" interleaved} ${true="--discard-trimmed" false="" discardTrimmed } \
-        ${true="--colorspace" false="" colorspace} ${true="--double-encode" false="" doubleEncode} \
-        ${true="--strip-f3" false="" stripF3} ${true="--maq" false="" maq} ${true="--bwa" false="" bwa} \
-        ${true="--zero-cap" false="" zeroCap} ${true="--no-zero-cap" false="" noZeroCap} \
-        ${read1} ${read2} ${"> " + reportPath}
+        ~{"--cores=" + cores} \
+        ~{true="-a " false="" defined(adapter)} ~{sep=" -a " adapter} \
+        ~{true="-A " false="" defined(adapterRead2)} ~{sep=" -A " adapterRead2} \
+        ~{true="-g " false="" defined(front)} ~{sep=" -g " front} \
+        ~{true="-G " false="" defined(frontRead2)} ~{sep=" -G " frontRead2} \
+        ~{true="-b " false="" defined(anywhere)} ~{sep=" -b " anywhere} \
+        ~{true="-B " false="" defined(anywhereRead2)} ~{sep=" -B " anywhereRead2} \
+        --output ~{read1output} ~{"--paired-output " + read2output} \
+        ~{"--to-short-output " + tooShortOutputPath} ~{"--to-short-paired-output " + tooShortPairedOutputPath} \
+        ~{"--to-long-output " + tooLongOutputPath} ~{"--to-long-paired-output " + tooLongPairedOutputPath} \
+        ~{"--untrimmed-output " + untrimmedOutputPath} ~{"--untrimmed-paired-output " + untrimmedPairedOutputPath} \
+        ~{"--pair-filter " + pairFilter} \
+        ~{"--error-rate " + errorRate} \
+        ~{"--times " + times} \
+        ~{"--overlap " + overlap} \
+        ~{"--cut " + cut} \
+        ~{"--nextseq-trim " + nextseqTrim} \
+        ~{"--quality-cutoff " + qualityCutoff} \
+        ~{"--quality-base " + qualityBase} \
+        ~{"--length " + length} \
+        ~{"--length-tag " + lengthTag} \
+        ~{"--strip-suffix " + stripSuffix} \
+        ~{"--prefix " + prefix} \
+        ~{"--suffix " + suffix} \
+        ~{"--minimum-length " + minimumLength} \
+        ~{"--maximum-length " + maximumLength} \
+        ~{"--max-n " + maxN} \
+        ~{true="--discard-untrimmed" false="" discardUntrimmed} \
+        ~{"--info-file " + infoFilePath } \
+        ~{"--rest-file " + restFilePath } \
+        ~{"--wildcard-file " + wildcardFilePath} \
+        ~{true="--match-read-wildcards" false="" matchReadWildcards} ~{true="--no-match-adapter-wildcards" false="" noMatchAdapterWildcards} \
+        ~{true="--no-trim" false="" noTrim} ~{true="--mask-adapter" false="" maskAdapter} \
+        ~{true="--no-indels" false="" noIndels} ~{true="--trim-n" false="" trimN}  \
+        ~{true="--interleaved" false="" interleaved} ~{true="--discard-trimmed" false="" discardTrimmed } \
+        ~{true="--colorspace" false="" colorspace} ~{true="--double-encode" false="" doubleEncode} \
+        ~{true="--strip-f3" false="" stripF3} ~{true="--maq" false="" maq} ~{true="--bwa" false="" bwa} \
+        ~{true="--zero-cap" false="" zeroCap} ~{true="--no-zero-cap" false="" noZeroCap} \
+        ~{read1} ~{read2} ~{"> " + reportPath}
     }
+
     output{
         File report = if defined(reportPath) then select_first([reportPath]) else stdout()
         File cutRead1 = read1output
@@ -118,6 +123,7 @@ task cutadapt {
         File? restFile=restFilePath
         File? wildcardFile=wildcardFilePath
     }
+
     runtime {
         cpu: select_first([cores])
         memory: select_first([memory])
diff --git a/fastqc.wdl b/fastqc.wdl
index d9135f73197bf1e985f5a096c45f449f37e42d94..4ca2733c53e2df4ddc58fec3a22081340d20ee52 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -1,46 +1,51 @@
+version 1.0
+
 task fastqc {
-    File seqFile
-    String outdirPath
-    String? preCommand
-    Boolean? casava
-    Boolean? nano
-    Boolean? noFilter
-    Boolean? extract = true
-    Boolean? nogroup
-    Int? minLength
-    String? format
-    Int? threads = 1
-    File? contaminants
-    File? adapters
-    File? limits
-    Int? kmers
-    String? dir
+    input {
+        File seqFile
+        String outdirPath
+        String? preCommand
+        Boolean? casava
+        Boolean? nano
+        Boolean? noFilter
+        Boolean? extract = true
+        Boolean? nogroup
+        Int? minLength
+        String? format
+        Int? threads = 1
+        File? contaminants
+        File? adapters
+        File? limits
+        Int? kmers
+        String? dir
+    }
+
     # Chops of the .gz extension if present.
     String name = sub(seqFile, "\\.gz$","")
     # This regex chops of the extension and replaces it with _fastqc for the reportdir.
     # Just as fastqc does it.
     String reportDir = outdirPath + "/" + sub(basename(name), "\\.[^\\.]*$", "_fastqc")
-    command {
-    set -e -o pipefail
-    ${preCommand}
-    mkdir -p ${outdirPath}
-    fastqc \
-    ${"--outdir " + outdirPath} \
-    ${true="--casava" false="" casava} \
-    ${true="--nano" false="" nano} \
-    ${true="--nofilter" false="" noFilter} \
-    ${true="--extract" false="" extract} \
-    ${true="--nogroup" false="" nogroup} \
-    ${"--min_length " + minLength } \
-    ${"--format " + format} \
-    ${"--threads " + threads} \
-    ${"--contaminants " + contaminants} \
-    ${"--adapters " + adapters} \
-    ${"--limits " + limits} \
-    ${"--kmers " + kmers} \
-    ${"--dir " + dir} \
-    ${seqFile}
 
+    command {
+        set -e -o pipefail
+        ~{preCommand}
+        mkdir -p ~{outdirPath}
+        fastqc \
+        ~{"--outdir " + outdirPath} \
+        ~{true="--casava" false="" casava} \
+        ~{true="--nano" false="" nano} \
+        ~{true="--nofilter" false="" noFilter} \
+        ~{true="--extract" false="" extract} \
+        ~{true="--nogroup" false="" nogroup} \
+        ~{"--min_length " + minLength } \
+        ~{"--format " + format} \
+        ~{"--threads " + threads} \
+        ~{"--contaminants " + contaminants} \
+        ~{"--adapters " + adapters} \
+        ~{"--limits " + limits} \
+        ~{"--kmers " + kmers} \
+        ~{"--dir " + dir} \
+        ~{seqFile}
     }
 
     output {
@@ -56,13 +61,15 @@ task fastqc {
 }
 
 task getConfiguration {
-    String? preCommand
-    String? fastqcDirFile = "fastqcDir.txt"
+    input {
+        String? preCommand
+        String? fastqcDirFile = "fastqcDir.txt"
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        echo $(dirname $(readlink -f $(which fastqc))) > ${fastqcDirFile}
+        ~{preCommand}
+        echo $(dirname $(readlink -f $(which fastqc))) > ~{fastqcDirFile}
     }
 
     output {
diff --git a/flash.wdl b/flash.wdl
index c081d49cdd3841e91991b0c90ac894d61d965e40..93ba4cd92b4f3d16a6e209c1fca9c6972b6052d9 100644
--- a/flash.wdl
+++ b/flash.wdl
@@ -1,27 +1,31 @@
+version 1.0
+
 task flash {
-    String? preCommand
-    File inputR1
-    File inputR2
-    String outdirPath
-    String? outPrefix = "flash"
-    Int? minOverlap
-    Int? maxOverlap
-    Boolean? compress = true
-    Int? threads
-    Int? memory
+    input {
+        String? preCommand
+        File inputR1
+        File inputR2
+        String outdirPath
+        String? outPrefix = "flash"
+        Int? minOverlap
+        Int? maxOverlap
+        Boolean? compress = true
+        Int? threads
+        Int? memory
+    }
 
     command {
         set -e -o pipefail
-        mkdir -p ${outdirPath}
-        ${preCommand}
+        mkdir -p ~{outdirPath}
+        ~{preCommand}
         flash \
-        ${"--threads=" + threads} \
-        ${"--output-directory=" + outdirPath} \
-        ${"--output-prefix=" + outPrefix} \
-        ${true="--compress " false="" defined(compress)} \
-        ${"--min-overlap=" + minOverlap} \
-        ${"--max-overlap=" + maxOverlap} \
-        ${inputR1} ${inputR2}
+        ~{"--threads=" + threads} \
+        ~{"--output-directory=" + outdirPath} \
+        ~{"--output-prefix=" + outPrefix} \
+        ~{true="--compress " false="" defined(compress)} \
+        ~{"--min-overlap=" + minOverlap} \
+        ~{"--max-overlap=" + maxOverlap} \
+        ~{inputR1} ~{inputR2}
     }
 
     output {
diff --git a/gatk.wdl b/gatk.wdl
index fbbc8138342e1e37aafb7289129d775e6aec962f..c8ea6e7d1e484e4afa334981ca8864b58b3d7d10 100644
--- a/gatk.wdl
+++ b/gatk.wdl
@@ -1,19 +1,22 @@
+version 1.0
 # Apply Base Quality Score Recalibration (BQSR) model
 task ApplyBQSR {
-    String? preCommand
-    File? gatkJar
-    File inputBam
-    File inputBamIndex
-    String outputBamPath
-    File recalibrationReport
-    Array[File]+ sequenceGroupInterval
-    File refDict
-    File refFasta
-    File refFastaIndex
-    Int? compressionLevel
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File? gatkJar
+        File inputBam
+        File inputBamIndex
+        String outputBamPath
+        File recalibrationReport
+        Array[File]+ sequenceGroupInterval
+        File refDict
+        File refFasta
+        File refFastaIndex
+        Int? compressionLevel
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -23,18 +26,18 @@ task ApplyBQSR {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
           ApplyBQSR \
           --create-output-bam-md5 \
           --add-output-sam-program-record \
-          -R ${refFasta} \
-          -I ${inputBam} \
+          -R ~{refFasta} \
+          -I ~{inputBam} \
           --use-original-qualities \
-          -O ${outputBamPath} \
-          -bqsr ${recalibrationReport} \
+          -O ~{outputBamPath} \
+          -bqsr ~{recalibrationReport} \
           --static-quantized-quals 10 --static-quantized-quals 20 --static-quantized-quals 30 \
-          -L ${sep=" -L " sequenceGroupInterval}
+          -L ~{sep=" -L " sequenceGroupInterval}
     }
 
     output {
@@ -49,19 +52,23 @@ task ApplyBQSR {
 
 # Generate Base Quality Score Recalibration (BQSR) model
 task BaseRecalibrator {
-    String? preCommand
-    File? gatkJar
-    File inputBam
-    File inputBamIndex
-    String recalibrationReportPath
-    Array[File]+ sequenceGroupInterval
-    Array[File]? knownIndelsSitesVCFs
-    Array[File]? knownIndelsSitesIndices
-    File? dbsnpVCF
-    File? dbsnpVCFindex
-    File refDict
-    File refFasta
-    File refFastaIndex
+    input {
+        String? preCommand
+        File? gatkJar
+        File inputBam
+        File inputBamIndex
+        String recalibrationReportPath
+        Array[File]+ sequenceGroupInterval
+        Array[File]? knownIndelsSitesVCFs
+        Array[File]? knownIndelsSitesIndices
+        File? dbsnpVCF
+        File? dbsnpVCFindex
+        File refDict
+        File refFasta
+        File refFastaIndex
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Array[File]+ knownIndelsSitesVCFsArg = flatten([
         select_first([knownIndelsSitesVCFs, []]),
@@ -72,9 +79,6 @@ task BaseRecalibrator {
         select_all([dbsnpVCFindex])
     ])
 
-    Float? memory
-    Float? memoryMultiplier
-
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(gatkJar)
@@ -83,15 +87,15 @@ task BaseRecalibrator {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
           BaseRecalibrator \
-          -R ${refFasta} \
-          -I ${inputBam} \
+          -R ~{refFasta} \
+          -I ~{inputBam} \
           --use-original-qualities \
-          -O ${recalibrationReportPath} \
-          --known-sites ${sep=" --known-sites " knownIndelsSitesVCFsArg} \
-          -L ${sep=" -L " sequenceGroupInterval}
+          -O ~{recalibrationReportPath} \
+          --known-sites ~{sep=" --known-sites " knownIndelsSitesVCFsArg} \
+          -L ~{sep=" -L " sequenceGroupInterval}
     }
 
     output {
@@ -104,22 +108,24 @@ task BaseRecalibrator {
 }
 
 task CombineGVCFs {
-    String? preCommand
-    Array[File]+ gvcfFiles
-    Array[File]+ gvcfFileIndexes
-    Array[File]+ intervals
+    input {
+        String? preCommand
+        Array[File]+ gvcfFiles
+        Array[File]+ gvcfFileIndexes
+        Array[File]+ intervals
 
-    String outputPath
+        String outputPath
 
-    String? gatkJar
+        String? gatkJar
 
-    File refFasta
-    File refFastaIndex
-    File refDict
+        File refFasta
+        File refFastaIndex
+        File refDict
 
-    Int? compressionLevel
-    Float? memory
-    Float? memoryMultiplier
+        Int? compressionLevel
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -129,18 +135,18 @@ task CombineGVCFs {
 
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
 
-        if [ ${length(gvcfFiles)} -gt 1 ]; then
-            ${toolCommand} \
+        if [ ~{length(gvcfFiles)} -gt 1 ]; then
+            ~{toolCommand} \
              CombineGVCFs \
-             -R ${refFasta} \
-             -O ${outputPath} \
-             -V ${sep=' -V ' gvcfFiles} \
-             -L ${sep=' -L ' intervals}
+             -R ~{refFasta} \
+             -O ~{outputPath} \
+             -V ~{sep=' -V ' gvcfFiles} \
+             -L ~{sep=' -L ' intervals}
         else # TODO this should be handeled in wdl
-            ln -sf ${select_first(gvcfFiles)} ${outputPath}
-            ln -sf ${select_first(gvcfFileIndexes)} ${outputPath}.tbi
+            ln -sf ~{select_first(gvcfFiles)} ~{outputPath}
+            ln -sf ~{select_first(gvcfFileIndexes)} ~{outputPath}.tbi
         fi
     }
 
@@ -156,13 +162,15 @@ task CombineGVCFs {
 
 # Combine multiple recalibration tables from scattered BaseRecalibrator runs
 task GatherBqsrReports {
-    String? preCommand
-    String? gatkJar
-    Array[File] inputBQSRreports
-    String outputReportPath
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        String? gatkJar
+        Array[File] inputBQSRreports
+        String outputReportPath
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -172,11 +180,11 @@ task GatherBqsrReports {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
         GatherBQSRReports \
-        -I ${sep=' -I ' inputBQSRreports} \
-        -O ${outputReportPath}
+        -I ~{sep=' -I ' inputBQSRreports} \
+        -O ~{outputReportPath}
     }
 
     output {
@@ -189,25 +197,27 @@ task GatherBqsrReports {
 }
 
 task GenotypeGVCFs {
-    String? preCommand
-    File gvcfFiles
-    File gvcfFileIndexes
-    Array[File]+ intervals
+    input {
+        String? preCommand
+        File gvcfFiles
+        File gvcfFileIndexes
+        Array[File]+ intervals
 
-    String outputPath
+        String outputPath
 
-    String? gatkJar
+        String? gatkJar
 
-    File refFasta
-    File refFastaIndex
-    File refDict
+        File refFasta
+        File refFastaIndex
+        File refDict
 
-    File? dbsnpVCF
-    File? dbsnpVCFindex
+        File? dbsnpVCF
+        File? dbsnpVCFindex
 
-    Int? compressionLevel
-    Float? memory
-    Float? memoryMultiplier
+        Int? compressionLevel
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -217,18 +227,18 @@ task GenotypeGVCFs {
 
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
 
-        ${toolCommand} \
+        ~{toolCommand} \
          GenotypeGVCFs \
-         -R ${refFasta} \
-         -O ${outputPath} \
-         ${"-D " + dbsnpVCF} \
+         -R ~{refFasta} \
+         -O ~{outputPath} \
+         ~{"-D " + dbsnpVCF} \
          -G StandardAnnotation \
          --only-output-calls-starting-in-intervals \
          -new-qual \
-         -V ${gvcfFiles} \
-         -L ${sep=' -L ' intervals}
+         -V ~{gvcfFiles} \
+         -L ~{sep=' -L ' intervals}
     }
 
     output {
@@ -243,23 +253,26 @@ task GenotypeGVCFs {
 
 # Call variants on a single sample with HaplotypeCaller to produce a GVCF
 task HaplotypeCallerGvcf {
-    String? preCommand
-    Array[File]+ inputBams
-    Array[File]+ inputBamsIndex
-    Array[File]+ intervalList
-    String gvcfPath
-    File refDict
-    File refFasta
-    File refFastaIndex
-    Float? contamination
-    Int? compressionLevel
-    String? gatkJar
-
-    File? dbsnpVCF
-    File? dbsnpVCFindex
-
-    Float? memory
-    Float? memoryMultiplier
+     input {
+        String? preCommand
+        Array[File]+ inputBams
+        Array[File]+ inputBamsIndex
+        Array[File]+ intervalList
+        String gvcfPath
+        File refDict
+        File refFasta
+        File refFastaIndex
+        Float? contamination
+        Int? compressionLevel
+        String? gatkJar
+
+        File? dbsnpVCF
+        File? dbsnpVCFindex
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(gatkJar)
@@ -268,15 +281,15 @@ task HaplotypeCallerGvcf {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
           HaplotypeCaller \
-          -R ${refFasta} \
-          -O ${gvcfPath} \
-          -I ${sep=" -I " inputBams} \
-          -L ${sep=' -L ' intervalList} \
-          ${"-D " + dbsnpVCF} \
-          -contamination ${default=0 contamination} \
+          -R ~{refFasta} \
+          -O ~{gvcfPath} \
+          -I ~{sep=" -I " inputBams} \
+          -L ~{sep=' -L ' intervalList} \
+          ~{"-D " + dbsnpVCF} \
+          -contamination ~{default=0 contamination} \
           -ERC GVCF
     }
 
@@ -291,19 +304,22 @@ task HaplotypeCallerGvcf {
 }
 
 task SplitNCigarReads {
-    String? preCommand
-
-    File inputBam
-    File inputBamIndex
-    File refFasta
-    File refFastaIndex
-    File refDict
-    String outputBam
-    String? gatkJar
-    Array[File]+ intervals
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+
+        File inputBam
+        File inputBamIndex
+        File refFasta
+        File refFastaIndex
+        File refDict
+        String outputBam
+        String? gatkJar
+        Array[File]+ intervals
+
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 4.0]))
 
     String toolCommand = if defined(gatkJar)
@@ -312,13 +328,13 @@ task SplitNCigarReads {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
         SplitNCigarReads \
-        -I ${inputBam} \
-        -R ${refFasta} \
-        -O ${outputBam} \
-        -L ${sep=' -L ' intervals}
+        -I ~{inputBam} \
+        -R ~{refFasta} \
+        -O ~{outputBam} \
+        -L ~{sep=' -L ' intervals}
     }
 
     output {
diff --git a/htseq.wdl b/htseq.wdl
index b634bf5ee0f08128729723eaf71e77536bf401f6..87c4c676fe5ea2485837449b0d802ea52e927fe4 100644
--- a/htseq.wdl
+++ b/htseq.wdl
@@ -1,25 +1,29 @@
+version 1.0
+
 task HTSeqCount {
-    String? preCommand
-    Array[File] alignmentFiles
-    File gtfFile
-    String outputTable
-    String? format
-    String? order
-    String? stranded
+    input {
+        String? preCommand
+        Array[File] alignmentFiles
+        File gtfFile
+        String outputTable
+        String? format
+        String? order
+        String? stranded
 
-    Int? memory
+        Int? memory
+    }
 
     command {
         set -e -o pipefail
-        mkdir -p ${sub(outputTable, basename(outputTable), "")}
-        ${preCommand}
+        mkdir -p ~{sub(outputTable, basename(outputTable), "")}
+        ~{preCommand}
         htseq-count \
-        -f ${default="bam" format} \
-        -r ${default="pos" order} \
-        -s ${default="no" stranded} \
-        ${sep=" " alignmentFiles} \
-        ${gtfFile} \
-        > ${outputTable}
+        -f ~{default="bam" format} \
+        -r ~{default="pos" order} \
+        -s ~{default="no" stranded} \
+        ~{sep=" " alignmentFiles} \
+        ~{gtfFile} \
+        > ~{outputTable}
     }
 
     output {
diff --git a/macs2.wdl b/macs2.wdl
index 9880c944a6b0942effc88472f64487b165d15d39..fb580348dbad6f6f10fba2f48d68545a25fd49b2 100644
--- a/macs2.wdl
+++ b/macs2.wdl
@@ -1,20 +1,24 @@
+version 1.0
+
 task PeakCalling {
-    String? preCommand
-    Array[File] bamFiles
-    String outDir
-    String sampleName
-    Int? threads
-    Int? memory
-    Boolean? nomodel
+    input {
+        String? preCommand
+        Array[File] bamFiles
+        String outDir
+        String sampleName
+        Int? threads
+        Int? memory
+        Boolean? nomodel
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
         macs2 callpeak \
-        --treatment ${sep = ' ' bamFiles} \
-        --outdir ${outDir} \
-        --name ${sampleName} \
-        ${default=false true='--nomodel' false='' nomodel}
+        --treatment ~{sep = ' ' bamFiles} \
+        --outdir ~{outDir} \
+        --name ~{sampleName} \
+        ~{default=false true='--nomodel' false='' nomodel}
     }
 
     output {
diff --git a/mergecounts.wdl b/mergecounts.wdl
index 8cca5dd494eefdaf208bedeffa051ec0960ed6d9..5de98e799a341e0f1ac3a3b4d2b6323e8e5a8c8c 100644
--- a/mergecounts.wdl
+++ b/mergecounts.wdl
@@ -1,26 +1,30 @@
-task MergeCounts {
-    String? preCommand
+version 1.0
 
-    Array[File] inputFiles
-    String outputFile
-    Int featureColumn
-    Int valueColumn
-    Boolean inputHasHeader
+task MergeCounts {
+    input {
+        String? preCommand
+
+        Array[File] inputFiles
+        String outputFile
+        Int featureColumn
+        Int valueColumn
+        Boolean inputHasHeader
+    }
 
     # Based on a script by Szymon Kielbasa/Ioannis Moustakas
     command <<<
         set -e -o pipefail
-        mkdir -p ${sub(outputFile, basename(outputFile) + "$", "")}
-        ${preCommand}
+        mkdir -p ~{sub(outputFile, basename(outputFile) + "$", "")}
+        ~{preCommand}
         R --no-save <<CODE
             library(dplyr)
             library(reshape2)
 
-            listOfFiles <- c("${sep='", "' inputFiles}")
+            listOfFiles <- c("~{sep='", "' inputFiles}")
 
-            valueI <- ${valueColumn}
-            featureI <- ${featureColumn}
-            header <- ${true="TRUE" false="FALSE" inputHasHeader}
+            valueI <- ~{valueColumn}
+            featureI <- ~{featureColumn}
+            header <- ~{true="TRUE" false="FALSE" inputHasHeader}
 
             d <- do.call(rbind, lapply(listOfFiles, function(file){
                 d <- read.table(file, sep="\t", header=header, comment.char="#")
@@ -34,7 +38,7 @@ task MergeCounts {
             }))
 
             d <- d %>% dcast(feature ~ sample, value.var="count")
-            write.table(d, file="${outputFile}", sep="\t", quote=FALSE, row.names=FALSE)
+            write.table(d, file="~{outputFile}", sep="\t", quote=FALSE, row.names=FALSE)
         CODE
     >>>
 
diff --git a/ncbi.wdl b/ncbi.wdl
index f32959ec6ebe01494e2b6faf6ed580c354e6417d..b6e0deb6f2008d6b238595c85779f31955788615 100644
--- a/ncbi.wdl
+++ b/ncbi.wdl
@@ -1,41 +1,45 @@
+version 1.0
+
 task genomeDownload {
-    String outputPath
-    String? section = "refseq"
-    String? format = "all"
-    String? assemblyLevel = "all"
-    String? taxId
-    String? refseqCategory
-    Boolean? humanReadable
-    String? ncbiBaseUri
-    Int? parallel
-    Int? retries
-    Boolean? verbose=true
-    Boolean? debug
-    String? domain = "all"
+    input {
+        String outputPath
+        String? section = "refseq"
+        String? format = "all"
+        String? assemblyLevel = "all"
+        String? taxId
+        String? refseqCategory
+        Boolean? humanReadable
+        String? ncbiBaseUri
+        Int? parallel
+        Int? retries
+        Boolean? verbose=true
+        Boolean? debug
+        String? domain = "all"
 
-    String? executable = "ncbi-genome-download"
-    String? preCommand
+        String? executable = "ncbi-genome-download"
+        String? preCommand
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${executable} \
-        ${"--section " + section} \
-        ${"--format " + format} \
-        ${"--assembly-level " + assemblyLevel } \
-        ${"--taxid " + taxId } \
-        ${"--refseq-category " + refseqCategory} \
-        ${"--output-folder " + outputPath } \
-        ${true="--human-readable" false="" humanReadable} \
-        ${"--uri " + ncbiBaseUri } \
-        ${"--parallel " + parallel } \
-        ${"--retries " + retries } \
-        ${true="--verbose" false="" verbose } \
-        ${true="--debug" false ="" debug } \
-        ${domain}
+        ~{preCommand}
+        ~{executable} \
+        ~{"--section " + section} \
+        ~{"--format " + format} \
+        ~{"--assembly-level " + assemblyLevel } \
+        ~{"--taxid " + taxId } \
+        ~{"--refseq-category " + refseqCategory} \
+        ~{"--output-folder " + outputPath } \
+        ~{true="--human-readable" false="" humanReadable} \
+        ~{"--uri " + ncbiBaseUri } \
+        ~{"--parallel " + parallel } \
+        ~{"--retries " + retries } \
+        ~{true="--verbose" false="" verbose } \
+        ~{true="--debug" false ="" debug } \
+        ~{domain}
 
         # Check md5sums for all downloaded files
-        for folder in $(realpath ${outputPath})/*/*/*
+        for folder in $(realpath ~{outputPath})/*/*/*
             do
                 (
                 md5sums="$(
@@ -69,20 +73,23 @@ task genomeDownload {
 
 
 task downloadNtFasta{
-    String libraryPath
-    String seqTaxMapPath
-    Boolean? unzip = true
-    String ntDir = libraryPath + "/nt"
-    String ntFilePath = ntDir + "/nt.fna"
+    input {
+        String libraryPath
+        String seqTaxMapPath
+        Boolean? unzip = true
+        String ntDir = libraryPath + "/nt"
+        String ntFilePath = ntDir + "/nt.fna"
+    }
+
     command {
         set -e -o pipefail
-        mkdir -p ${ntDir}
-        rsync -av --partial rsync://ftp.ncbi.nih.gov/blast/db/FASTA/nt.gz* ${ntDir}
-        (cd ${ntDir} && md5sum -c nt.gz.md5)
+        mkdir -p ~{ntDir}
+        rsync -av --partial rsync://ftp.ncbi.nih.gov/blast/db/FASTA/nt.gz* ~{ntDir}
+        (cd ~{ntDir} && md5sum -c nt.gz.md5)
         # Only unzip when necessary
-        if ${true='true' false='false' unzip}
+        if ~{true='true' false='false' unzip}
         then
-            zcat ${ntDir}/nt.gz > ${ntFilePath}
+            zcat ~{ntDir}/nt.gz > ~{ntFilePath}
         fi
         }
     output {
@@ -96,16 +103,19 @@ task downloadNtFasta{
 }
 
 task downloadAccessionToTaxId {
-    String downloadDir
-    Boolean gzip = false
+    input {
+        String downloadDir
+        Boolean gzip = false
+    }
+
     command {
         set -e -o pipefail
-        mkdir -p ${downloadDir}
-        rsync -av --partial rsync://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_*.accession2taxid.gz* ${downloadDir}
-        (cd ${downloadDir} && md5sum -c *.md5)
-        for file in ${downloadDir}/nucl_*.accession2taxid.gz
+        mkdir -p ~{downloadDir}
+        rsync -av --partial rsync://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_*.accession2taxid.gz* ~{downloadDir}
+        (cd ~{downloadDir} && md5sum -c *.md5)
+        for file in ~{downloadDir}/nucl_*.accession2taxid.gz
         do
-            zcat $file | tail -n +2 | cut -f 2,3 ${true="| gzip " false='' gzip}> $file.seqtaxmap${true='.gz' false='' gzip}
+            zcat $file | tail -n +2 | cut -f 2,3 ~{true="| gzip " false='' gzip}> $file.seqtaxmap~{true='.gz' false='' gzip}
         done
         }
     output {
diff --git a/picard.wdl b/picard.wdl
index 444af3bafb2f1dfa19518065c4532f2a633d45bb..71f566e8ad0591da14d0848a2acfd4e583e211ad 100644
--- a/picard.wdl
+++ b/picard.wdl
@@ -1,28 +1,32 @@
+version 1.0
+
 task CollectMultipleMetrics {
-    String? preCommand
-    File bamFile
-    File bamIndex
-    File refFasta
-    File refDict
-    File refFastaIndex
-    String basename
-
-    # These should proably be optional, but I'm not sure how to handle the ouput in that
-    # case (without a null literal).
-    Boolean collectAlignmentSummaryMetrics = true
-    Boolean collectInsertSizeMetrics = true
-    Boolean qualityScoreDistribution = true
-    Boolean meanQualityByCycle = true
-    Boolean collectBaseDistributionByCycle = true
-    Boolean collectGcBiasMetrics = true
-    #Boolean? rnaSeqMetrics = false # There is a bug in picard https://github.com/broadinstitute/picard/issues/999
-    Boolean collectSequencingArtifactMetrics = true
-    Boolean collectQualityYieldMetrics = true
-
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File bamFile
+        File bamIndex
+        File refFasta
+        File refDict
+        File refFastaIndex
+        String basename
+
+        # These should proably be optional, but I'm not sure how to handle the ouput in that
+        # case (without a null literal).
+        Boolean collectAlignmentSummaryMetrics = true
+        Boolean collectInsertSizeMetrics = true
+        Boolean qualityScoreDistribution = true
+        Boolean meanQualityByCycle = true
+        Boolean collectBaseDistributionByCycle = true
+        Boolean collectGcBiasMetrics = true
+        #Boolean? rnaSeqMetrics = false # There is a bug in picard https://github.com/broadinstitute/picard/issues/999
+        Boolean collectSequencingArtifactMetrics = true
+        Boolean collectQualityYieldMetrics = true
+
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -32,23 +36,23 @@ task CollectMultipleMetrics {
 
     command {
         set -e -o pipefail
-        mkdir -p $(dirname "${basename}")
-        ${preCommand}
-        ${toolCommand} \
+        mkdir -p $(dirname "~{basename}")
+        ~{preCommand}
+        ~{toolCommand} \
         CollectMultipleMetrics \
-        I=${bamFile} \
-        R=${refFasta} \
-        O=${basename} \
+        I=~{bamFile} \
+        R=~{refFasta} \
+        O=~{basename} \
         PROGRAM=null \
-        ${true="PROGRAM=CollectAlignmentSummaryMetrics" false="" collectAlignmentSummaryMetrics} \
-        ${true="PROGRAM=CollectInsertSizeMetrics" false="" collectInsertSizeMetrics} \
-        ${true="PROGRAM=QualityScoreDistribution" false="" qualityScoreDistribution} \
-        ${true="PROGRAM=MeanQualityByCycle" false="" meanQualityByCycle} \
-        ${true="PROGRAM=CollectBaseDistributionByCycle" false="" collectBaseDistributionByCycle} \
-        ${true="PROGRAM=CollectGcBiasMetrics" false="" collectGcBiasMetrics} \
-        ${true="PROGRAM=CollectSequencingArtifactMetrics" false=""
+        ~{true="PROGRAM=CollectAlignmentSummaryMetrics" false="" collectAlignmentSummaryMetrics} \
+        ~{true="PROGRAM=CollectInsertSizeMetrics" false="" collectInsertSizeMetrics} \
+        ~{true="PROGRAM=QualityScoreDistribution" false="" qualityScoreDistribution} \
+        ~{true="PROGRAM=MeanQualityByCycle" false="" meanQualityByCycle} \
+        ~{true="PROGRAM=CollectBaseDistributionByCycle" false="" collectBaseDistributionByCycle} \
+        ~{true="PROGRAM=CollectGcBiasMetrics" false="" collectGcBiasMetrics} \
+        ~{true="PROGRAM=CollectSequencingArtifactMetrics" false=""
             collectSequencingArtifactMetrics} \
-        ${true="PROGRAM=CollectQualityYieldMetrics" false="" collectQualityYieldMetrics}
+        ~{true="PROGRAM=CollectQualityYieldMetrics" false="" collectQualityYieldMetrics}
     }
 
     output {
@@ -78,17 +82,19 @@ task CollectMultipleMetrics {
 }
 
 task CollectRnaSeqMetrics {
-    String? preCommand
-    File bamFile
-    File bamIndex
-    File refRefflat
-    String basename
-    String? strandSpecificity = "NONE"
-
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File bamFile
+        File bamIndex
+        File refRefflat
+        String basename
+        String? strandSpecificity = "NONE"
+
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -98,15 +104,15 @@ task CollectRnaSeqMetrics {
 
     command {
         set -e -o pipefail
-        mkdir -p $(dirname "${basename}")
-        ${preCommand}
-        ${toolCommand} \
+        mkdir -p $(dirname "~{basename}")
+        ~{preCommand}
+        ~{toolCommand} \
         CollectRnaSeqMetrics \
-        I=${bamFile} \
-        O=${basename}.RNA_Metrics \
-        CHART_OUTPUT=${basename}.RNA_Metrics.pdf \
-        ${"STRAND_SPECIFICITY=" + strandSpecificity} \
-        REF_FLAT=${refRefflat}
+        I=~{bamFile} \
+        O=~{basename}.RNA_Metrics \
+        CHART_OUTPUT=~{basename}.RNA_Metrics.pdf \
+        ~{"STRAND_SPECIFICITY=" + strandSpecificity} \
+        REF_FLAT=~{refRefflat}
     }
 
     output {
@@ -120,20 +126,22 @@ task CollectRnaSeqMetrics {
 }
 
 task CollectTargetedPcrMetrics {
-    String? preCommand
-    File bamFile
-    File bamIndex
-    File refFasta
-    File refDict
-    File refFastaIndex
-    File ampliconIntervals
-    Array[File]+ targetIntervals
-    String basename
-
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File bamFile
+        File bamIndex
+        File refFasta
+        File refDict
+        File refFastaIndex
+        File ampliconIntervals
+        Array[File]+ targetIntervals
+        String basename
+
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -143,17 +151,17 @@ task CollectTargetedPcrMetrics {
 
     command {
         set -e -o pipefail
-        mkdir -p $(dirname "${basename}")
-        ${preCommand}
-        ${toolCommand} \
+        mkdir -p $(dirname "~{basename}")
+        ~{preCommand}
+        ~{toolCommand} \
         CollectTargetedPcrMetrics \
-        I=${bamFile} \
-        R=${refFasta} \
-        AMPLICON_INTERVALS=${ampliconIntervals} \
-        TARGET_INTERVALS=${sep=" TARGET_INTERVALS=" targetIntervals} \
-        O=${basename}.targetPcrMetrics \
-        PER_BASE_COVERAGE=${basename}.targetPcrPerBaseCoverage \
-        PER_TARGET_COVERAGE=${basename}.targetPcrPerTargetCoverage
+        I=~{bamFile} \
+        R=~{refFasta} \
+        AMPLICON_INTERVALS=~{ampliconIntervals} \
+        TARGET_INTERVALS=~{sep=" TARGET_INTERVALS=" targetIntervals} \
+        O=~{basename}.targetPcrMetrics \
+        PER_BASE_COVERAGE=~{basename}.targetPcrPerBaseCoverage \
+        PER_TARGET_COVERAGE=~{basename}.targetPcrPerTargetCoverage
     }
 
     output {
@@ -169,14 +177,16 @@ task CollectTargetedPcrMetrics {
 
 # Combine multiple recalibrated BAM files from scattered ApplyRecalibration runs
 task GatherBamFiles {
-    String? preCommand
-    Array[File]+ input_bams
-    String output_bam_path
-    Int? compression_level
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        Array[File]+ input_bams
+        String output_bam_path
+        Int? compression_level
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -186,19 +196,19 @@ task GatherBamFiles {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
           GatherBamFiles \
-          INPUT=${sep=' INPUT=' input_bams} \
-          OUTPUT=${output_bam_path} \
+          INPUT=~{sep=' INPUT=' input_bams} \
+          OUTPUT=~{output_bam_path} \
           CREATE_INDEX=true \
           CREATE_MD5_FILE=true
     }
 
     output {
-        File output_bam = "${output_bam_path}"
+        File output_bam = "~{output_bam_path}"
         File output_bam_index = sub(output_bam_path, ".bam$", ".bai")
-        File output_bam_md5 = "${output_bam_path}.md5"
+        File output_bam_md5 = "~{output_bam_path}.md5"
     }
 
     runtime {
@@ -208,20 +218,22 @@ task GatherBamFiles {
 
 # Mark duplicate reads to avoid counting non-independent observations
 task MarkDuplicates {
-    String? preCommand
-    Array[File] input_bams
-    String output_bam_path
-    String metrics_path
-    Int? compression_level
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
-
-    # The program default for READ_NAME_REGEX is appropriate in nearly every case.
-    # Sometimes we wish to supply "null" in order to turn off optical duplicate detection
-    # This can be desirable if you don't mind the estimated library size being wrong and optical duplicate detection is taking >7 days and failing
-    String? read_name_regex
+    input {
+        String? preCommand
+        Array[File] input_bams
+        String output_bam_path
+        String metrics_path
+        Int? compression_level
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+
+        # The program default for READ_NAME_REGEX is appropriate in nearly every case.
+        # Sometimes we wish to supply "null" in order to turn off optical duplicate detection
+        # This can be desirable if you don't mind the estimated library size being wrong and optical duplicate detection is taking >7 days and failing
+        String? read_name_regex
+    }
 
     # Task is assuming query-sorted input so that the Secondary and Supplementary reads get marked correctly
     # This works because the output of BWA is query-grouped and therefore, so is the output of MergeBamAlignment.
@@ -234,15 +246,15 @@ task MarkDuplicates {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p $(dirname ${output_bam_path})
-        ${toolCommand} \
+        ~{preCommand}
+        mkdir -p $(dirname ~{output_bam_path})
+        ~{toolCommand} \
           MarkDuplicates \
-          INPUT=${sep=' INPUT=' input_bams} \
-          OUTPUT=${output_bam_path} \
-          METRICS_FILE=${metrics_path} \
+          INPUT=~{sep=' INPUT=' input_bams} \
+          OUTPUT=~{output_bam_path} \
+          METRICS_FILE=~{metrics_path} \
           VALIDATION_STRINGENCY=SILENT \
-          ${"READ_NAME_REGEX=" + read_name_regex} \
+          ~{"READ_NAME_REGEX=" + read_name_regex} \
           OPTICAL_DUPLICATE_PIXEL_DISTANCE=2500 \
           CLEAR_DT="false" \
           CREATE_INDEX=true \
@@ -262,15 +274,17 @@ task MarkDuplicates {
 
 # Combine multiple VCFs or GVCFs from scattered HaplotypeCaller runs
 task MergeVCFs {
-    String? preCommand
-    Array[File] inputVCFs
-    Array[File] inputVCFsIndexes
-    String outputVCFpath
-    Int? compressionLevel
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        Array[File] inputVCFs
+        Array[File] inputVCFsIndexes
+        String outputVCFpath
+        Int? compressionLevel
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     # Using MergeVcfs instead of GatherVcfs so we can create indices
     # See https://github.com/broadinstitute/picard/issues/789 for relevant GatherVcfs ticket
@@ -282,11 +296,11 @@ task MergeVCFs {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
           MergeVcfs \
-          INPUT=${sep=' INPUT=' inputVCFs} \
-          OUTPUT=${outputVCFpath}
+          INPUT=~{sep=' INPUT=' inputVCFs} \
+          OUTPUT=~{outputVCFpath}
     }
 
     output {
@@ -300,14 +314,17 @@ task MergeVCFs {
 }
 
 task SamToFastq {
-    String? preCommand
-    File inputBam
-    String outputRead1
-    String? outputRead2
-    String? outputUnpaired
-    String? picardJar
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File inputBam
+        String outputRead1
+        String? outputRead2
+        String? outputUnpaired
+        String? picardJar
+        Float? memory
+        Float? memoryMultiplier
+    }
+
     Int mem = ceil(select_first([memory, 16.0])) # High memory default to avoid crashes.
 
     String toolCommand = if defined(picardJar)
@@ -316,13 +333,13 @@ task SamToFastq {
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        ${toolCommand} \
+        ~{preCommand}
+        ~{toolCommand} \
         SamToFastq \
-        I=${inputBam} \
-        ${"FASTQ=" + outputRead1} \
-        ${"SECOND_END_FASTQ=" + outputRead2} \
-        ${"UNPAIRED_FASTQ=" + outputUnpaired}
+        I=~{inputBam} \
+        ~{"FASTQ=" + outputRead1} \
+        ~{"SECOND_END_FASTQ=" + outputRead2} \
+        ~{"UNPAIRED_FASTQ=" + outputUnpaired}
     }
 
     output {
@@ -337,13 +354,15 @@ task SamToFastq {
 }
 
 task ScatterIntervalList {
-    String? preCommand
-    File interval_list
-    Int scatter_count
-    String? picardJar
-
-    Float? memory
-    Float? memoryMultiplier
+    input {
+        String? preCommand
+        File interval_list
+        Int scatter_count
+        String? picardJar
+
+        Float? memory
+        Float? memoryMultiplier
+    }
 
     Int mem = ceil(select_first([memory, 4.0]))
 
@@ -353,15 +372,15 @@ task ScatterIntervalList {
 
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
         mkdir scatter_list
-        ${toolCommand} \
+        ~{toolCommand} \
           IntervalListTools \
-          SCATTER_COUNT=${scatter_count} \
+          SCATTER_COUNT=~{scatter_count} \
           SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \
           UNIQUE=true \
           SORT=true \
-          INPUT=${interval_list} \
+          INPUT=~{interval_list} \
           OUTPUT=scatter_list
     }
 
diff --git a/samtools.wdl b/samtools.wdl
index b574ec5f023c13adb366e301e99bd7702d686fd0..d756fda3367a89c7a8f97d9ede216f45592bcce8 100644
--- a/samtools.wdl
+++ b/samtools.wdl
@@ -1,12 +1,16 @@
+version 1.0
+
 task Index {
-    String? preCommand
-    File bamFilePath
-    String? bamIndexPath
+    input {
+        String? preCommand
+        File bamFilePath
+        String? bamIndexPath
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        samtools index ${bamFilePath} ${bamIndexPath}
+        ~{preCommand}
+        samtools index ~{bamFilePath} ~{bamIndexPath}
     }
 
     output {
@@ -15,14 +19,16 @@ task Index {
 }
 
 task Merge {
-    String? preCommand
-    Array[File]+ bamFiles
-    String outputBamPath
+    input {
+        String? preCommand
+        Array[File]+ bamFiles
+        String outputBamPath
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        samtools merge ${outputBamPath} ${sep=' ' bamFiles}
+        ~{preCommand}
+        samtools merge ~{outputBamPath} ~{sep=' ' bamFiles}
     }
 
     output {
@@ -31,14 +37,16 @@ task Merge {
 }
 
 task Markdup {
-    String? preCommand
-    File inputBam
-    String outputBamPath
+    input {
+        String? preCommand
+        File inputBam
+        String outputBamPath
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        samtools markdup ${inputBam} ${outputBamPath}
+        ~{preCommand}
+        samtools markdup ~{inputBam} ~{outputBamPath}
     }
 
     output {
@@ -47,15 +55,17 @@ task Markdup {
 }
 
 task Flagstat {
-    String? preCommand
-    File inputBam
-    String outputPath
+    input {
+        String? preCommand
+        File inputBam
+        String outputPath
+    }
 
     command {
         set -e -o pipefail
-        ${preCommand}
-        mkdir -p $(dirname ${outputPath})
-        samtools flagstat ${inputBam} > ${outputPath}
+        ~{preCommand}
+        mkdir -p $(dirname ~{outputPath})
+        samtools flagstat ~{inputBam} > ~{outputPath}
     }
 
     output {
@@ -64,45 +74,50 @@ task Flagstat {
 }
 
 task fastq {
-    String? preCommand
-    File inputBam
-    String outputRead1
-    String? outputRead2
-    String? outputRead0
-    Int? includeFilter
-    Int? excludeFilter
-    Int? excludeSpecificFilter
-    Boolean? appendReadNumber
-    Boolean? outputQuality
-    Int? compressionLevel
-    Int? threads
-    Int? memory
-    Int totalThreads = select_first([threads, 1])
+    input {
+        String? preCommand
+        File inputBam
+        String outputRead1
+        String? outputRead2
+        String? outputRead0
+        Int? includeFilter
+        Int? excludeFilter
+        Int? excludeSpecificFilter
+        Boolean? appendReadNumber
+        Boolean? outputQuality
+        Int? compressionLevel
+        Int? threads
+        Int? memory
+        Int totalThreads = select_first([threads, 1])
+    }
 
     command {
-        ${preCommand}
+        ~{preCommand}
         samtools fastq \
-        ${true="-1" false="-s" defined(outputRead2)} ${outputRead1} \
-        ${"-2 " + outputRead2} \
-        ${"-0 " + outputRead0} \
-        ${"-f " + includeFilter} \
-        ${"-F " + excludeFilter} \
-        ${"-G " + excludeSpecificFilter} \
-        ${true="-N" false="-n" appendReadNumber} \
-        ${true="-O" false="" outputQuality} \
-        ${"-c " + compressionLevel} \
-        ${"--threads " + totalThreads} \
-        ${inputBam}
+        ~{true="-1" false="-s" defined(outputRead2)} ~{outputRead1} \
+        ~{"-2 " + outputRead2} \
+        ~{"-0 " + outputRead0} \
+        ~{"-f " + includeFilter} \
+        ~{"-F " + excludeFilter} \
+        ~{"-G " + excludeSpecificFilter} \
+        ~{true="-N" false="-n" appendReadNumber} \
+        ~{true="-O" false="" outputQuality} \
+        ~{"-c " + compressionLevel} \
+        ~{"--threads " + totalThreads} \
+        ~{inputBam}
     }
+
     output {
         File read1 = outputRead1
         File? read2 = outputRead2
         File? read0 = outputRead0
     }
+
     runtime {
         cpu: totalThreads
         memory: select_first([memory, 1])
     }
+
     parameter_meta {
         preCommand: "A command that is run before the task. Can be used to activate environments"
         inputBam: "The bam file to process."
@@ -116,31 +131,33 @@ task fastq {
 }
 
 task view {
-    String? preCommand
-    File inFile
-    File? referenceFasta
-    String outputFileName
-    Boolean? outputBam
-    Boolean? uncompressedBamOutput
-    Int? includeFilter
-    Int? excludeFilter
-    Int? excludeSpecificFilter
-    Int? threads
-    Int? memory
+    input {
+        String? preCommand
+        File inFile
+        File? referenceFasta
+        String outputFileName
+        Boolean? outputBam
+        Boolean? uncompressedBamOutput
+        Int? includeFilter
+        Int? excludeFilter
+        Int? excludeSpecificFilter
+        Int? threads
+        Int? memory
+    }
 
     command {
-    set -e -o pipefail
-    ${preCommand}
-    samtools view \
-    ${"-T " + referenceFasta} \
-    ${"-o " + outputFileName} \
-    ${true="-b " false="" outputBam} \
-    ${true="-u " false="" uncompressedBamOutput} \
-    ${"-f " + includeFilter} \
-    ${"-F " + excludeFilter} \
-    ${"-G " + excludeSpecificFilter} \
-    ${"--threads " + threads - 1} \
-    ${inFile}
+        set -e -o pipefail
+        ~{preCommand}
+        samtools view \
+        ~{"-T " + referenceFasta} \
+        ~{"-o " + outputFileName} \
+        ~{true="-b " false="" outputBam} \
+        ~{true="-u " false="" uncompressedBamOutput} \
+        ~{"-f " + includeFilter} \
+        ~{"-F " + excludeFilter} \
+        ~{"-G " + excludeSpecificFilter} \
+        ~{"--threads " + threads - 1} \
+        ~{inFile}
     }
 
     output {
diff --git a/seqtk.wdl b/seqtk.wdl
index 35fbedf368a7d62f1c9ed9643ea96fe0dd7a5a12..d55fa716a993525a68d0559ad97462d31de513af 100644
--- a/seqtk.wdl
+++ b/seqtk.wdl
@@ -1,25 +1,30 @@
+version 1.0
+
 task sample {
-    File sequenceFile
-    String? outFilePath = "subsampledReads.fq.gz"
-    String? preCommand
-    Int? seed
-    Boolean? twoPassMode
-    Float? fraction
-    Int? number
-    Boolean? zip = true
+    input {
+        File sequenceFile
+        String? outFilePath = "subsampledReads.fq.gz"
+        String? preCommand
+        Int? seed
+        Boolean? twoPassMode
+        Float? fraction
+        Int? number
+        Boolean? zip = true
+    }
 
     command {
-    set -e -o pipefail
-    ${'mkdir -p $(dirname ' + outFilePath + ')'}
-    ${preCommand}
-    seqtk sample \
-    ${"-s " + seed} \
-    ${true="-2 " false="" twoPassMode} \
-    ${sequenceFile} \
-    ${number} ${fraction} \
-    ${true="| gzip" false="" zip} \
-    ${"> " + outFilePath}
+        set -e -o pipefail
+        ~{'mkdir -p $(dirname ' + outFilePath + ')'}
+        ~{preCommand}
+        seqtk sample \
+        ~{"-s " + seed} \
+        ~{true="-2 " false="" twoPassMode} \
+        ~{sequenceFile} \
+        ~{number} ~{fraction} \
+        ~{true="| gzip" false="" zip} \
+        ~{"> " + outFilePath}
     }
+
     output {
         File subsampledReads= select_first([outFilePath])
     }
diff --git a/spades.wdl b/spades.wdl
index f0feb573ec4fb71f09ec5cb42f62fe45c4ed7cb8..57bc6eb83ef5b6f5cbd30778f54b9c92c6e03451 100644
--- a/spades.wdl
+++ b/spades.wdl
@@ -1,68 +1,74 @@
+version 1.0
+
 task spades {
-    String outputDir
-    String? preCommand
-    File read1
-    File? read2
-    File? interlacedReads
-    File? sangerReads
-    File? pacbioReads
-    File? nanoporeReads
-    File? tslrContigs
-    File? trustedContigs
-    File? untrustedContigs
-    Boolean? singleCell
-    Boolean? metagenomic
-    Boolean? rna
-    Boolean? plasmid
-    Boolean? ionTorrent
-    Boolean? onlyErrorCorrection
-    Boolean? onlyAssembler
-    Boolean? careful
-    Boolean? disableGzipOutput
-    Boolean? disableRepeatResolution
-    File? dataset
-    Int? threads
-    Float? memoryGb
-    File? tmpDir
-    String? k
-    Float? covCutoff
-    Int? phredOffset
-    Int finalThreads = select_first([threads,1])
+    input {
+        String outputDir
+        String? preCommand
+        File read1
+        File? read2
+        File? interlacedReads
+        File? sangerReads
+        File? pacbioReads
+        File? nanoporeReads
+        File? tslrContigs
+        File? trustedContigs
+        File? untrustedContigs
+        Boolean? singleCell
+        Boolean? metagenomic
+        Boolean? rna
+        Boolean? plasmid
+        Boolean? ionTorrent
+        Boolean? onlyErrorCorrection
+        Boolean? onlyAssembler
+        Boolean? careful
+        Boolean? disableGzipOutput
+        Boolean? disableRepeatResolution
+        File? dataset
+        Int? threads = 1
+        Float? memoryGb
+        File? tmpDir
+        String? k
+        Float? covCutoff
+        Int? phredOffset
+    }
+
+    Int finalThreads = select_first([threads])
     Float totalMemory = select_first([memoryGb, finalThreads * 16.0])
     Int finalMemory = ceil(totalMemory)
     Int clusterMemory = ceil(totalMemory / finalThreads)
 
     command {
         set -e -o pipefail
-        ${preCommand}
+        ~{preCommand}
         spades.py \
-        ${"-o " + outputDir} \
-        ${true="--sc" false="" singleCell} \
-        ${true="--meta" false="" metagenomic} \
-        ${true="--rna" false="" rna} \
-        ${true="--plasmid" false="" plasmid} \
-        ${true="--iontorrent" false="" ionTorrent} \
-        ${"--12 " + interlacedReads } \
-        ${true="-1" false="-s" defined(read2)} ${read1}  \
-        ${"-2 " + read2 } \
-        ${"--sanger " + sangerReads } \
-        ${"--pacbio " + pacbioReads } \
-        ${"--nanopore " + nanoporeReads } \
-        ${"--tslr " + tslrContigs } \
-        ${"--trusted-contigs " + trustedContigs } \
-        ${"--untrusted-contigs " + untrustedContigs } \
-        ${true="--only-error-correction" false="" onlyErrorCorrection } \
-        ${true="--only-assembler" false="" onlyAssembler } \
-        ${true="--careful" false="" careful } \
-        ${true="--disable-gzip-output" false="" disableGzipOutput} \
-        ${true="--disable-rr" false="" disableRepeatResolution } \
-        ${"--dataset " + dataset } \
-        ${"--threads " + finalThreads} \
-        ${"--memory " + finalMemory } \
-        ${"-k " + k } \
-        ${"--cov-cutoff " + covCutoff } \
-        ${"--phred-offset " + phredOffset }
+        ~{"-o " + outputDir} \
+        ~{true="--sc" false="" singleCell} \
+        ~{true="--meta" false="" metagenomic} \
+        ~{true="--rna" false="" rna} \
+        ~{true="--plasmid" false="" plasmid} \
+        ~{true="--iontorrent" false="" ionTorrent} \
+        ~{"--12 " + interlacedReads } \
+        ~{true="-1" false="-s" defined(read2)} ~{read1}  \
+        ~{"-2 " + read2 } \
+        ~{"--sanger " + sangerReads } \
+        ~{"--pacbio " + pacbioReads } \
+        ~{"--nanopore " + nanoporeReads } \
+        ~{"--tslr " + tslrContigs } \
+        ~{"--trusted-contigs " + trustedContigs } \
+        ~{"--untrusted-contigs " + untrustedContigs } \
+        ~{true="--only-error-correction" false="" onlyErrorCorrection } \
+        ~{true="--only-assembler" false="" onlyAssembler } \
+        ~{true="--careful" false="" careful } \
+        ~{true="--disable-gzip-output" false="" disableGzipOutput} \
+        ~{true="--disable-rr" false="" disableRepeatResolution } \
+        ~{"--dataset " + dataset } \
+        ~{"--threads " + finalThreads} \
+        ~{"--memory " + finalMemory } \
+        ~{"-k " + k } \
+        ~{"--cov-cutoff " + covCutoff } \
+        ~{"--phred-offset " + phredOffset }
     }
+
     output {
         Array[File] correctedReads = glob(outputDir + "/corrected/*.fastq*")
         File scaffolds = outputDir + "/scaffolds.fasta"
@@ -74,6 +80,7 @@ task spades {
         File params = outputDir + "/params.txt"
         File log = outputDir + "/spades.log"
     }
+
     runtime {
         cpu: finalThreads
         memory: clusterMemory
diff --git a/star.wdl b/star.wdl
index 941a1d60137ad31dbc4ab7cbe7d8f6616bbee7b5..1301fe145daaf9d79c7055e5cea7d30dcc322e4d 100644
--- a/star.wdl
+++ b/star.wdl
@@ -1,20 +1,24 @@
+version 1.0
+
 task Star {
-    String? preCommand
+    input {
+        String? preCommand
 
-    Array[File] inputR1
-    Array[File]? inputR2
-    String genomeDir
-    String outFileNamePrefix
+        Array[File] inputR1
+        Array[File]? inputR2
+        String genomeDir
+        String outFileNamePrefix
 
-    String? outSAMtype
-    String? readFilesCommand
-    Int? runThreadN
-    String? outStd
-    String? twopassMode
-    Array[String]? outSAMattrRGline
-    Int? limitBAMsortRAM
+        String? outSAMtype
+        String? readFilesCommand
+        Int? runThreadN
+        String? outStd
+        String? twopassMode
+        Array[String]? outSAMattrRGline
+        Int? limitBAMsortRAM
 
-    Int? memory
+        Int? memory
+    }
 
     #TODO needs to be extended for all possible output extensions
     Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"}
@@ -24,19 +28,19 @@ task Star {
 
     command {
         set -e -o pipefail
-        mkdir -p ${sub(outFileNamePrefix, basename(outFileNamePrefix) + "$", "")}
-        ${preCommand}
+        mkdir -p ~{sub(outFileNamePrefix, basename(outFileNamePrefix) + "$", "")}
+        ~{preCommand}
         STAR \
-        --readFilesIn ${sep=',' inputR1} ${sep="," inputR2} \
-        --outFileNamePrefix ${outFileNamePrefix} \
-        --genomeDir ${genomeDir} \
-        --outSAMtype ${default="BAM SortedByCoordinate" outSAMtype} \
-        --readFilesCommand ${default="zcat" readFilesCommand} \
-        ${"--runThreadN " + runThreadN} \
-        ${"--outStd " + outStd} \
-        ${"--twopassMode " + twopassMode} \
-        ${"--limitBAMsortRAM " + limitBAMsortRAM} \
-        ${true="--outSAMattrRGline " false="" defined(outSAMattrRGline)} ${sep=" , " outSAMattrRGline}
+        --readFilesIn ~{sep=',' inputR1} ~{sep="," inputR2} \
+        --outFileNamePrefix ~{outFileNamePrefix} \
+        --genomeDir ~{genomeDir} \
+        --outSAMtype ~{default="BAM SortedByCoordinate" outSAMtype} \
+        --readFilesCommand ~{default="zcat" readFilesCommand} \
+        ~{"--runThreadN " + runThreadN} \
+        ~{"--outStd " + outStd} \
+        ~{"--twopassMode " + twopassMode} \
+        ~{"--limitBAMsortRAM " + limitBAMsortRAM} \
+        ~{true="--outSAMattrRGline " false="" defined(outSAMattrRGline)} ~{sep=" , " outSAMattrRGline}
     }
 
     output {
@@ -50,13 +54,15 @@ task Star {
 }
 
 task makeStarRGline {
-    String sample
-    String library
-    String? platform
-    String readgroup
+    input {
+        String sample
+        String library
+        String? platform
+        String readgroup
+    }
 
     command {
-        printf '"ID:${readgroup}" "LB:${library}" "PL:${default="ILLUMINA" platform}" "SM:${sample}"'
+        printf '"ID:~{readgroup}" "LB:~{library}" "PL:~{default="ILLUMINA" platform}" "SM:~{sample}"'
     }
 
     output {
diff --git a/stringtie.wdl b/stringtie.wdl
index f5c6854cbacb671113fde7b4a0ac6e459e128ac1..9929b8062aa9edb17a7fa3d832529794938e6b8d 100644
--- a/stringtie.wdl
+++ b/stringtie.wdl
@@ -1,26 +1,29 @@
+version 1.0
+
 task Stringtie {
-    String? preCommand
-    File alignedReads
-    File? referenceGtf
-    Int? threads
-    String assembledTranscriptsFile
-    Boolean? firstStranded
-    Boolean? secondStranded
-    String? geneAbundanceFile
+    input {
+        String? preCommand
+        File alignedReads
+        File? referenceGtf
+        Int? threads
+        String assembledTranscriptsFile
+        Boolean? firstStranded
+        Boolean? secondStranded
+        String? geneAbundanceFile
+    }
 
     command {
         set -e -o pipefail
-        mkdir -p $(dirname ${assembledTranscriptsFile})
-        ${preCommand}
+        mkdir -p $(dirname ~{assembledTranscriptsFile})
+        ~{preCommand}
         stringtie \
-        ${"-p " + threads} \
-        ${"-G " + referenceGtf} \
-        ${true="--rf" false="" firstStranded} \
-        ${true="fr" false="" secondStranded} \
-        -o ${assembledTranscriptsFile} \
-        ${"-A " + geneAbundanceFile} \
-        ${alignedReads} \
-
+        ~{"-p " + threads} \
+        ~{"-G " + referenceGtf} \
+        ~{true="--rf" false="" firstStranded} \
+        ~{true="fr" false="" secondStranded} \
+        -o ~{assembledTranscriptsFile} \
+        ~{"-A " + geneAbundanceFile} \
+        ~{alignedReads}
     }
 
     output {
diff --git a/unicycler.wdl b/unicycler.wdl
index f7aa36a48067bcd2f880a843d1a4aa401c7f5078..318252ae25ef8c94ab10e2f6cab7bfca5476971a 100644
--- a/unicycler.wdl
+++ b/unicycler.wdl
@@ -1,102 +1,107 @@
+version 1.0
+
 task unicycler {
-    String? preCommand
-    File? short1
-    File? short2
-    File? unpaired
-    File? long
-    String out
-    Int? verbosity
-    Int? minFastaLength
-    Int? keep
-    Boolean? vcf
-    Int? threads
-    Int? memory
-    Int finalThreads = select_first(threads, 1)
-    Int finalMemory = select_first(memory, 4)
-    String? mode
-    Float? minBridgeQual
-    Int? linearSeqs
-    File? spadesPath
-    Boolean? noCorrect
-    Float? minKmerFrac
-    Float? maxKmerFrac
-    Int? kmerCount
-    Float? depthFilter
-    Boolean? noMiniasm
-    File? raconPath
-    File? existingLongReadAssembly
-    Boolean? noRotate
-    File? startGenes
-    Float? startGeneId
-    Float? startGeneCov
-    String? makeblastdbPath
-    File? tblastnPath
-    Boolean? noPilon
-    File? bowtie2Path
-    File? bowtie2buildPath
-    File? samtoolsPath
-    File? pilonPath
-    File? javaPath
-    Int? minPolishSize
-    File? bcftoolsPath
-    Int? minComponentSize
-    Int? minDeadEndSize
-    File? contamination
-    String? scores
-    String? lowScore
+    input {
+        String? preCommand
+        File? short1
+        File? short2
+        File? unpaired
+        File? long
+        String out
+        Int? verbosity
+        Int? minFastaLength
+        Int? keep
+        Boolean? vcf
+        Int? threads = 1
+        Int? memory = 4
+        String? mode
+        Float? minBridgeQual
+        Int? linearSeqs
+        File? spadesPath
+        Boolean? noCorrect
+        Float? minKmerFrac
+        Float? maxKmerFrac
+        Int? kmerCount
+        Float? depthFilter
+        Boolean? noMiniasm
+        File? raconPath
+        File? existingLongReadAssembly
+        Boolean? noRotate
+        File? startGenes
+        Float? startGeneId
+        Float? startGeneCov
+        String? makeblastdbPath
+        File? tblastnPath
+        Boolean? noPilon
+        File? bowtie2Path
+        File? bowtie2buildPath
+        File? samtoolsPath
+        File? pilonPath
+        File? javaPath
+        Int? minPolishSize
+        File? bcftoolsPath
+        Int? minComponentSize
+        Int? minDeadEndSize
+        File? contamination
+        String? scores
+        String? lowScore
+    }
+
     command {
         set -e -o pipefail
-        mkdir -p ${out}
-        ${preCommand}
+        mkdir -p ~{out}
+        ~{preCommand}
         unicycler \
-        ${"--short1 " + short1} \
-        ${"--short2 " + short2} \
-        ${"--unpaired " + unpaired} \
-        ${"--long " + long} \
-        --out ${out} \
-        ${"--min_fasta_length " + minFastaLength} \
-        ${"--keep " + keep } \
-        ${true="--vcf" false="" vcf } \
-        ${"--threads " + finalThreads } \
-        ${"--mode " + mode } \
-        ${"--min_bridge_qual " + minBridgeQual } \
-        ${"--linear_seqs " + linearSeqs } \
-        ${"--spades_path " + spadesPath } \
-        ${true="--no_correct" false="" noCorrect } \
-        ${"--min_kmer_frac " + minKmerFrac } \
-        ${"--max_kmer_frac " + maxKmerFrac } \
-        ${"--kmer_count " + kmerCount } \
-        ${"--depth_filter " + depthFilter } \
-        ${true="--no_miniasm" false="" noMiniasm } \
-        ${"--racon_path " + raconPath } \
-        ${"--existing_long_read_assembly " + existingLongReadAssembly } \
-        ${true="--no_rotate" false="" noRotate } \
-        ${"--start_genes " + startGenes } \
-        ${"--start_gene_id " + startGeneId } \
-        ${"--start_gene_cov " + startGeneCov } \
-        ${"--makeblastdb_path " + makeblastdbPath } \
-        ${"--tblastn_path " + tblastnPath } \
-        ${true="--no_pilon" false="" noPilon } \
-        ${"--bowtie2_path " + bowtie2Path } \
-        ${"--bowtie2_build_path " + bowtie2buildPath } \
-        ${"--samtools_path " + samtoolsPath } \
-        ${"--pilon_path " + pilonPath } \
-        ${"--java_path " + javaPath } \
-        ${"--min_polish_size " + minPolishSize } \
-        ${"--bcftools_path " + bcftoolsPath } \
-        ${"--min_component_size " + minComponentSize } \
-        ${"--min_dead_end_size " + minDeadEndSize } \
-        ${"--contamination " + contamination } \
-        ${"--scores " + scores } \
-        ${"--low_score " + lowScore }
+        ~{"--short1 " + short1} \
+        ~{"--short2 " + short2} \
+        ~{"--unpaired " + unpaired} \
+        ~{"--long " + long} \
+        --out ~{out} \
+        ~{"--min_fasta_length " + minFastaLength} \
+        ~{"--keep " + keep } \
+        ~{true="--vcf" false="" vcf } \
+        ~{"--threads " + threads } \
+        ~{"--mode " + mode } \
+        ~{"--min_bridge_qual " + minBridgeQual } \
+        ~{"--linear_seqs " + linearSeqs } \
+        ~{"--spades_path " + spadesPath } \
+        ~{true="--no_correct" false="" noCorrect } \
+        ~{"--min_kmer_frac " + minKmerFrac } \
+        ~{"--max_kmer_frac " + maxKmerFrac } \
+        ~{"--kmer_count " + kmerCount } \
+        ~{"--depth_filter " + depthFilter } \
+        ~{true="--no_miniasm" false="" noMiniasm } \
+        ~{"--racon_path " + raconPath } \
+        ~{"--existing_long_read_assembly " + existingLongReadAssembly } \
+        ~{true="--no_rotate" false="" noRotate } \
+        ~{"--start_genes " + startGenes } \
+        ~{"--start_gene_id " + startGeneId } \
+        ~{"--start_gene_cov " + startGeneCov } \
+        ~{"--makeblastdb_path " + makeblastdbPath } \
+        ~{"--tblastn_path " + tblastnPath } \
+        ~{true="--no_pilon" false="" noPilon } \
+        ~{"--bowtie2_path " + bowtie2Path } \
+        ~{"--bowtie2_build_path " + bowtie2buildPath } \
+        ~{"--samtools_path " + samtoolsPath } \
+        ~{"--pilon_path " + pilonPath } \
+        ~{"--java_path " + javaPath } \
+        ~{"--min_polish_size " + minPolishSize } \
+        ~{"--bcftools_path " + bcftoolsPath } \
+        ~{"--min_component_size " + minComponentSize } \
+        ~{"--min_dead_end_size " + minDeadEndSize } \
+        ~{"--contamination " + contamination } \
+        ~{"--scores " + scores } \
+        ~{"--low_score " + lowScore }
     }
+
     output {
         File assemblyFasta = out + "/assembly.fasta"
         File assemblyGfa = out + "/assembly.gfa"
         File log = out + "/unicycler.log"
     }
+
     runtime {
-        cpu: finalThreads
-        memory: finalMemory
+        cpu: select_first([threads])
+        memory: select_first([memory])
     }
 }
\ No newline at end of file