diff --git a/src/hg/encode/encodeMergeReplicates/encodeMergeReplicates.c b/src/hg/encode/encodeMergeReplicates/encodeMergeReplicates.c
index b68a4ef..14333df 100644
--- a/src/hg/encode/encodeMergeReplicates/encodeMergeReplicates.c
+++ b/src/hg/encode/encodeMergeReplicates/encodeMergeReplicates.c
@@ -3,6 +3,7 @@
 #include "linefile.h"
 #include "hash.h"
 #include "options.h"
+#include "narrowPeak.h"
 
 static char const rcsid[] = "$Id: newProg.c,v 1.30 2010/03/24 21:18:33 hiram Exp $";
 
@@ -10,9 +11,10 @@ void usage()
 /* Explain usage and exit. */
 {
 errAbort(
-  "encodeMergeReplicates - Merge together replicates for a pooled output.  Only works on narrowPeak files currently.\n"
+  "encodeMergeReplicates - Merge together replicates for a pooled output.  \n"
+  "Only works on narrowPeak files currently.\n"
   "usage:\n"
-  "   encodeMergeReplicates XXX\n"
+  "   encodeMergeReplicates in1 in2 in3 ... output\n"
   "options:\n"
   "   -xxx=XXX\n"
   );
@@ -22,8 +24,9 @@ static struct optionSpec options[] = {
    {NULL, 0},
 };
 
-void encodeMergeReplicates(char *XXX)
-/* encodeMergeReplicates - Merge together replicates for a pooled output.  Only works on narrowPeak files currently.. */
+void encodeMergeReplicates(int inCount, char *inNames[], char *outName)
+/* encodeMergeReplicates - Merge together replicates for a pooled output.  
+ * Only works on narrowPeak files currently. */
 {
 }
 
@@ -31,8 +34,8 @@ int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
-if (argc != 2)
+if (argc < 4)
     usage();
-encodeMergeReplicates(argv[1]);
+encodeMergeReplicates(argv+1, argc-2, argv[argc-1]);
 return 0;
 }
diff --git a/src/hg/makeDb/trackDb/human/hg18/trackDb.wgEncode.ra b/src/hg/makeDb/trackDb/human/hg18/trackDb.wgEncode.ra
index cdcd9c0..04342b6 100644
--- a/src/hg/makeDb/trackDb/human/hg18/trackDb.wgEncode.ra
+++ b/src/hg/makeDb/trackDb/human/hg18/trackDb.wgEncode.ra
@@ -1683,14 +1683,14 @@ group regulation
 	type wig 0.00 4417.02
 	color 191,128,255
 
-    track wgEncodeRegMarkEnhancer
+    track wgEncodeRegMarkEnhH3k4me1
     # compositeTrack on
     container multiWig
     noInherit on
     type wig 0 10000
     superTrack wgEncodeReg full
     shortLabel Enhancer H3K4Me1
-    longLabel Enhancer histone mark (H3K4Me1) on 8 cell lines from ENCODE
+    longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on 8 Cell Lines from ENCODE
     release alpha
     configurable on
     visibility full
@@ -1700,74 +1700,74 @@ group regulation
     showSubtrackColorOnUi on
     priority 2
 
-	track wgEncodeRegMarkEnhancerGm12878
+	track wgEncodeRegMarkEnhH3k4me1Gm12878
 	shortLabel	Gm12878
-	longLabel Enhancer mark (H3K4Me1) on Gm12878 cells from ENCODE
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on Gm12878 cells from ENCODE
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	type wig 0.00 9323.50
 	color 255,128,128
 	table wgEncodeBroadChipSeqSignalGm12878H3k4me1
 
-	track wgEncodeRegMarkEnhancerH1hesc
+	track wgEncodeRegMarkEnhH3k4me1H1hesc
 	shortLabel	H1 ES
-	longLabel Enhancer mark (H3K4Me1) on H1 ES cells from ENCODE
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on H1 ES cells from ENCODE
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 255,223,128
 	table wgEncodeBroadChipSeqSignalH1hescH3k4me1
 	type wig 0.00 12286.00
 
-	track wgEncodeRegMarkEnhancerHmec
+	track wgEncodeRegMarkEnhH3k4me1Hmec
 	shortLabel	HMEC
-	longLabel Enhancer mark (H3K4Me1) on HMEC cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on HMEC cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 191,255,128
 	table wgEncodeBroadChipSeqSignalHmecH3k4me1
 	type wig 0.00 13574.00
 
-	track wgEncodeRegMarkEnhancerHsmm
+	track wgEncodeRegMarkEnhH3k4me1Hsmm
 	shortLabel	HSMM
-	longLabel Enhancer mark (H3K4Me1) on HSMM cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on HSMM cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 128,255,159
 	table wgEncodeBroadChipSeqSignalHsmmH3k4me1
 	type wig 0.00 10412.00
 
-	track wgEncodeRegMarkEnhancerHuvec
+	track wgEncodeRegMarkEnhH3k4me1Huvec
 	shortLabel	HUVEC
-	longLabel Enhancer mark (H3K4Me1) on HUVEC cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on HUVEC cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 128,255,255
 	table wgEncodeBroadChipSeqSignalHuvecH3k4me1
 	type wig 0.00 5259.25
 
-	track wgEncodeRegMarkEnhancerK562
+	track wgEncodeRegMarkEnhH3k4me1K562
 	shortLabel	K562
-	longLabel Enhancer mark (H3K4Me1) on K562 cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on K562 cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 128,159,255
 	table wgEncodeBroadChipSeqSignalK562H3k4me1
 	type wig 0.00 8682.25
 
-	track wgEncodeRegMarkEnhancerNhek
+	track wgEncodeRegMarkEnhH3k4me1Nhek
 	shortLabel	NHEK
-	longLabel Enhancer mark (H3K4Me1) on NHEK cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on NHEK cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 191,128,255
 	table wgEncodeBroadChipSeqSignalNhekH3k4me1
 	type wig 0.00 4240.50
 
-	track wgEncodeRegMarkEnhancerNhlf
+	track wgEncodeRegMarkEnhH3k4me1Nhlf
 	shortLabel	NHLF
-	longLabel Enhancer mark (H3K4Me1) on NHLF cells from ENCODE 
+	longLabel H3K4Me1 - an Enhancer and Promoter Histone Mark on NHLF cells from ENCODE 
         release alpha
-	parent wgEncodeRegMarkEnhancer
+	parent wgEncodeRegMarkEnhH3k4me1
 	color 255,128,223
 	table wgEncodeBroadChipSeqSignalNhlfH3k4me1
 	type wig 0.00 14639.00
@@ -1779,7 +1779,7 @@ group regulation
     type wig 0 10000
     superTrack wgEncodeReg full
     shortLabel Enhancer H3K27Ac
-    longLabel Enhancer histone mark (H3K27Ac) on 8 cell lines from ENCODE
+    longLabel H3K27Ac - An Enhancer and Promoter Histone Mark on 8 Cell Lines from ENCODE
     release alpha
     configurable on
     visibility full
@@ -1791,7 +1791,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acGm12878
 	shortLabel	Gm12878
-	longLabel Enhancer mark (H3K27Ac) on Gm12878 cells from ENCODE
+	longLabel H3K27Ac - An enhancer and promoter mark on Gm12878 cells from ENCODE
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	type wig 0.00 9323.50
@@ -1800,7 +1800,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acH1hesc
 	shortLabel	H1 ES
-	longLabel Enhancer mark (H3K27Ac) on H1 ES cells from ENCODE
+	longLabel H3K27Ac - An enhancer and promoter mark on H1 ES cells from ENCODE
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 255,223,128
@@ -1809,7 +1809,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acHmec
 	shortLabel	HMEC
-	longLabel Enhancer mark (H3K27Ac) on HMEC cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on HMEC cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 191,255,128
@@ -1818,7 +1818,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acHsmm
 	shortLabel	HSMM
-	longLabel Enhancer mark (H3K27Ac) on HSMM cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on HSMM cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 128,255,159
@@ -1827,7 +1827,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acHuvec
 	shortLabel	HUVEC
-	longLabel Enhancer mark (H3K27Ac) on HUVEC cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on HUVEC cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 128,255,255
@@ -1836,7 +1836,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acK562
 	shortLabel	K562
-	longLabel Enhancer mark (H3K27Ac) on K562 cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on K562 cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 128,159,255
@@ -1845,7 +1845,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acNhek
 	shortLabel	NHEK
-	longLabel Enhancer mark (H3K27Ac) on NHEK cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on NHEK cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 191,128,255
@@ -1854,7 +1854,7 @@ group regulation
 
 	track wgEncodeRegMarkEnhH3k27acNhlf
 	shortLabel	NHLF
-	longLabel Enhancer mark (H3K27Ac) on NHLF cells from ENCODE 
+	longLabel H3K27Ac - An enhancer and promoter mark on NHLF cells from ENCODE 
         release alpha
 	parent wgEncodeRegMarkEnhH3k27ac
 	color 255,128,223
@@ -1971,7 +1971,7 @@ group regulation
     type factorSource
     superTrack wgEncodeReg dense
     sourceTable wgEncodeRegTfbsCells
-    inputTracks wgEncodeYaleChIPseq
+    inputTracks wgEncodeYaleChIPseq wgEncodeHudsonalphaChipSeq
     inputTracksSubgroupSelect view=Peaks
     inputTracksSubgroupDisplay cellType factor
     visibility dense
diff --git a/src/hg/regulate/regCluster/makefile b/src/hg/regulate/regCluster/makefile
index b4de7cb..d1c0e73 100644
--- a/src/hg/regulate/regCluster/makefile
+++ b/src/hg/regulate/regCluster/makefile
@@ -5,7 +5,7 @@ MYLIBDIR = ../../../lib/${MACHTYPE}
 MYLIBS =  ${MYLIBDIR}/jkweb.a
 
 A = regCluster
-O = regCluster.o
+O = regCluster.o 
 
 regCluster: ${O} ${MYLIBS}
 	${CC} ${COPT} -o ${DESTDIR}${BINDIR}/${A}${EXE} $O ${MYLIBS} $L
diff --git a/src/hg/regulate/regCluster/regCluster.c b/src/hg/regulate/regCluster/regCluster.c
index 7d8245c..0c3691c 100644
--- a/src/hg/regulate/regCluster/regCluster.c
+++ b/src/hg/regulate/regCluster/regCluster.c
@@ -3,10 +3,9 @@
 #include "linefile.h"
 #include "hash.h"
 #include "options.h"
-#include "sqlNum.h"
-#include "obscure.h"
 #include "localmem.h"
 #include "rangeTree.h"
+#include "peakCluster.h"
 
 static char const rcsid[] = "$Id: regCluster.c,v 1.4 2010/05/16 21:41:42 kent Exp $";
 
@@ -51,247 +50,6 @@ static struct optionSpec options[] = {
    {NULL, 0},
 };
 
-struct regDim
-/* A regulatory dimension */
-    {
-    int colIx;		/* Column index in table. */
-    char *label;	/* Label */
-    };
-
-struct regSource 
-/* A source of regulatory information */
-    {
-    struct regSource *next;
-    char *dataSource;		/* File (or table) */
-    int chromColIx;		/* Chromosome column index. */
-    int startColIx;		/* Start coordinate column index. */
-    int endColIx;		/* End ccoordinate column ix. */
-    int scoreColIx;		/* Index for score column. */
-    double normFactor;		/* Multiply this to get browser score. */
-    char **labels;		/* Label for each dimension */
-    int minColCount;		/* Minimum number of columns. */
-    };
-
-struct regItem
-/* An item in a regulatory track */
-    {
-    struct regItem *next;
-    char *chrom;		/* Chromosome. Not allocated here. */
-    int chromStart,chromEnd;	/* Half open coordinates. */
-    double score;		/* Ideally something like -log(p). */
-    struct regSource *source;   /* Source track/file for item. */
-    };
-
-struct regCluster
-/* A cluster of items. */
-    {
-    struct regCluster *next;
-    char *chrom;		/* Chromosome.  Not allocated here. */
-    int chromStart, chromEnd;	/* Half open coordinates. */
-    double score;		/* Sum of component scores. */
-    double maxSubScore;		/* Max of component scores. */
-    struct slRef *itemRefList;	/* List of references to component items. */
-    };
-
-struct regSource *regSourceLoadAll(char *fileName, int dimCount)
-/* Read file, parse it line by line and return list of regSources. */
-{
-struct lineFile *lf = lineFileOpen(fileName, TRUE);
-int rowSize = dimCount + 6;
-char *row[rowSize];
-struct regSource *sourceList = NULL, *source;
-while (lineFileNextRow(lf, row, rowSize))
-    {
-    /* Allocate struct and read in fixed fields. */
-    AllocVar(source);
-    source->dataSource = cloneString(row[0]);
-    source->chromColIx = sqlUnsigned(row[1]);
-    source->startColIx = sqlUnsigned(row[2]);
-    source->endColIx = sqlUnsigned(row[3]);
-    source->scoreColIx = sqlUnsigned(row[4]);
-    source->normFactor = sqlDouble(row[5]);
-
-    /* Read in dimension labels. */
-    AllocArray(source->labels, dimCount);
-    int i;
-    for (i=0; i<dimCount; ++i)
-        source->labels[i] = cloneString(row[i+6]);
-
-    /* Calculate required columns. */
-    int minColCount = max(source->chromColIx, source->startColIx);
-    minColCount = max(minColCount, source->endColIx);
-    minColCount = max(minColCount, source->scoreColIx);
-    source->minColCount = minColCount + 1;
-    slAddHead(&sourceList, source);
-    }
-lineFileClose(&lf);
-slReverse(&sourceList);
-return sourceList;
-}
-
-void clusterSource(struct regSource *source, struct hash *chromHash, 
-	struct rbTreeNode *stack[128])
-/* Read through data source and add items to it to rangeTrees in hash */
-{
-struct lineFile *lf = lineFileOpen(source->dataSource, TRUE);
-struct lm *lm = chromHash->lm;	/* Local memory pool - share with hash */
-char *row[source->minColCount];
-struct regItem *item;
-while (lineFileNextRow(lf, row, source->minColCount))
-    {
-    char *chrom = row[source->chromColIx];
-    struct hashEl *hel = hashLookup(chromHash, chrom);
-    if (hel == NULL)
-        {
-	struct rbTree *tree = rangeTreeNewDetailed(lm, stack);
-	hel = hashAdd(chromHash, chrom, tree);
-	}
-    struct rbTree *tree = hel->val;
-    lmAllocVar(lm, item);
-    item->chrom = hel->name;
-    item->chromStart = sqlUnsigned(row[source->startColIx]);
-    item->chromEnd = sqlUnsigned(row[source->endColIx]);
-    item->score = sqlDouble(row[source->scoreColIx]) * source->normFactor;
-    if (item->score > 1000) item->score = 1000;
-    item->source = source;
-    rangeTreeAddValList(tree, item->chromStart, item->chromEnd, item);
-    }
-
-lineFileClose(&lf);
-}
-
-int cmpChromEls(const void *va, const void *vb)
-/* Compare to sort based on query start. */
-{
-const struct hashEl *a = *((struct hashEl **)va);
-const struct hashEl *b = *((struct hashEl **)vb);
-return cmpWordsWithEmbeddedNumbers(a->name, b->name);
-}
-
-void addCluster(struct lm *lm, struct regItem *itemList, int start, int end,
-	struct regCluster **pList)
-/* Make cluster of all items that overlap start/end, and put it on list. */
-{
-struct regCluster *cluster;
-lmAllocVar(lm, cluster);
-double score = 0.0;
-double maxSubScore = 0.0;
-struct slRef  *refList = NULL, *ref;
-struct regItem *item;
-for (item = itemList; item != NULL; item = item->next)
-    {
-    if (rangeIntersection(start, end, item->chromStart, item->chromEnd) > 0)
-	{
-	lmAllocVar(lm, ref);
-	ref->val = item;
-	slAddHead(&refList, ref);
-	score += item->score;
-	if (item->score > maxSubScore) maxSubScore = item->score;
-	}
-    }
-slReverse(&refList);
-cluster->chrom = itemList->chrom;
-cluster->chromStart = start;
-cluster->chromEnd = end;
-cluster->itemRefList = refList;
-cluster->score = score;
-cluster->maxSubScore = maxSubScore;
-slAddHead(pList, cluster);
-}
-
-struct regCluster *clusterItems(struct lm *lm, struct regItem *itemList, 
-	double forceJoinScore, double weakLevel)
-/* Convert a list of items to a list of clusters of items.  This may break up clusters that
- * have weakly linked parts. 
-      [                ]
-      AAAAAAAAAAAAAAAAAA 
-       BBBBBB   DDDDDD
-        CCCC     EEEE
-   gets tranformed into
-       [    ]   [    ]
-      AAAAAAAAAAAAAAAAAA 
-       BBBBBB   DDDDDD
-        CCCC     EEEE
-   The strategy is to build a rangeTree of coverage, which might look something like so:
-      123333211123333211 
-   then define cluster ends that exceed the minimum limit, which is either 10% of the highest
-   or forceJoinScore if 10% of the highest is more than forceJoinScore.  This will go to
-   something like so:
-        [---]   [----]   
-   Finally the items that are overlapping a cluster are assigned to it.  Note that this
-   may mean that an item may be in multiple clusters.
-        [ABC]   [ ADE]
- */
-{
-int easyMax = round(1.0/weakLevel);
-int itemCount = slCount(itemList);
-struct regCluster *clusterList = NULL;
-if (itemCount < easyMax)
-    {
-    struct regItem *item = itemList;
-    int chromStart = item->chromStart;
-    int chromEnd = item->chromEnd;
-    for (item = item->next; item != NULL; item = item->next)
-        {
-	if (item->chromStart < chromStart) chromStart = item->chromStart;
-	if (item->chromEnd > chromEnd) chromEnd = item->chromEnd;
-	}
-    addCluster(lm, itemList, chromStart, chromEnd, &clusterList);
-    }
-else
-    {
-    /* Make up coverage tree. */
-    struct rbTree *covTree = rangeTreeNew();
-    struct regItem *item;
-    for (item = itemList; item != NULL; item = item->next)
-	rangeTreeAddToCoverageDepth(covTree, item->chromStart, item->chromEnd);
-    struct range *range, *rangeList = rangeTreeList(covTree);
-
-    /* Figure out maximum coverage. */
-    int maxCov = 0;
-    for (range = rangeList; range != NULL; range = range->next)
-        {
-	int cov = ptToInt(range->val);
-	if (cov > maxCov) maxCov = cov;
-	}
-
-    /* Figure coverage threshold. */
-    int threshold = round(maxCov * weakLevel);
-    if (threshold > forceJoinScore-1) threshold = forceJoinScore-1;
-
-    /* Loop through emitting sections over threshold as clusters */
-    boolean inRange = FALSE;
-    boolean start = 0, end = 0;
-    for (range = rangeList; range != NULL; range = range->next)
-        {
-	int cov = ptToInt(range->val);
-	if (cov > threshold)
-	    {
-	    if (inRange)
-	       end = range->end;
-	    else
-	       {
-	       inRange = TRUE;
-	       start = range->start;
-	       end = range->end;
-	       }
-	    }
-	else
-	    {
-	    if (inRange)
-		{
-		addCluster(lm, itemList, start, end, &clusterList);
-		inRange = FALSE;
-		}
-	    }
-	}
-    if (inRange)
-        addCluster(lm, itemList, start, end, &clusterList);
-    }
-slReverse(&clusterList);
-return clusterList;
-}
-
 static int clusterIx = 0;
 
 void outputClustersForChrom(char *chrom, struct rbTree *tree, FILE *fCluster, FILE *fBed)
@@ -302,13 +60,13 @@ verbose(2, "Got %d ranges on %s\n", slCount(rangeList), chrom);
 struct lm *lm = lmInit(0);
 for (range = rangeList; range != NULL; range = range->next)
     {
-    struct regCluster *cluster, *clusterList = clusterItems(lm, range->val, 
+    struct peakCluster *cluster, *clusterList = peakClusterItems(lm, range->val, 
     	clForceJoinScore, clWeakLevel);
     for (cluster = clusterList; cluster != NULL; cluster = cluster->next)
         {
 	struct slRef *ref, *refList=cluster->itemRefList;
 	++clusterIx;
-	struct regItem *item = refList->val;
+	struct peakItem *item = refList->val;
 	struct hash *uniqHash = hashNew(0);
 	for (ref = refList; ref != NULL; ref = ref->next)
 	    {
@@ -335,20 +93,17 @@ lmCleanup(&lm);
 void regCluster(char *tableOfTables, char *outCluster, char *outBed)
 /* regCluster - Cluster regulator regions. */
 {
-struct regSource *source, *sourceList = regSourceLoadAll(tableOfTables, clDims);
+struct peakSource *source, *sourceList = peakSourceLoadAll(tableOfTables, clDims);
 verbose(1, "Read %d sources from %s\n", slCount(sourceList), tableOfTables);
-struct hash *chromHash = hashNew(0);
-struct rbTreeNode *stack[128];
+struct peakClusterMaker *maker = peakClusterMakerNew();
 for (source = sourceList; source != NULL; source = source->next)
-    {
-    clusterSource(source, chromHash, stack);
-    }
+    peakClusterMakerAddFromSource(maker, source);
 
 /* Get out list of chromosomes and process one at a time. */
 FILE *fCluster = mustOpen(outCluster, "w");
 FILE *fBed = mustOpen(outBed, "w");
-struct hashEl *chrom, *chromList = hashElListHash(chromHash);
-slSort(&chromList, cmpChromEls);
+struct hashEl *chrom;
+struct hashEl *chromList = peakClusterMakerChromList(maker);
 int totalClusters = 0;
 for (chrom = chromList; chrom != NULL; chrom = chrom->next)
     {
@@ -357,10 +112,10 @@ for (chrom = chromList; chrom != NULL; chrom = chrom->next)
     outputClustersForChrom(chrom->name, tree, fCluster, fBed);
     }
 verbose(1, "%d singly-linked clusters, %d clusters in %d chromosomes\n", 
-	totalClusters, clusterIx, chromHash->elCount);
+	totalClusters, clusterIx, maker->chromHash->elCount);
 carefulClose(&fCluster);
 carefulClose(&fBed);
-
+peakClusterMakerFree(&maker);
 }
 
 int main(int argc, char *argv[])
diff --git a/src/hg/utils/automation/Encode.pm b/src/hg/utils/automation/Encode.pm
old mode 100644
new mode 100755
diff --git a/src/hg/utils/automation/EnsGeneAutomate.pm b/src/hg/utils/automation/EnsGeneAutomate.pm
old mode 100644
new mode 100755
diff --git a/src/hg/utils/automation/HgDb.pm b/src/hg/utils/automation/HgDb.pm
old mode 100644
new mode 100755
