Fixed merge bugs w/ sort order and chrom change, added unit tests