FIXED TONS and added a few test codes for edge detection
Merge Fix