Scoped variables

cc @d4tocchini 
I could make this `return scope.join("") + gap.join("")` if you prefer.