tidy up bam swapping scripts