Attempt to circumvent schema lock when merging points

Moved appending of percent visibility to main script, updated loops with
a variable for range.