fix fragment size selection in proper pair function
rename read local to avoid clib function name collision
refresh source formatting
add additional self-edge tests
fix self edge merging and include new test cases reproducing original issue