A few fixes to appease R CMD check; that involving overlap.threshold may have been a bug
Some bug fixes copied from my local code (which was used to generate the figures in the manuscript submission)