Put extendMatch inside the if statements in compress and added the dir attribute to the edit scripts to take into account the direction of the edit script.
Added both calls to extendMatch for each seedLoc where it is called