Fixed output BAM Header and several tests