Fix up offsets and check output of edge finding code