Add tests for reference position and fix end position off-by-one-error
Make overlaps use inclusive end position