Munge and Indexing fixes

Various changes to munging and indexing scripts