Progress towards the edge finding routine

Still buggy, probably getting screwed over by the lousy depepper
algorithm.