Replace bam_calend with bam_endpos and removing last vestiges of bam.h dependance.