Cleaned up the Nextflow pipelines so they are easier to read and maintain. Also improved how the channels are handled to prevent blocking (waiting until all jobs for one process are done before the next can start). This should make it easier to upgrade