Changed how edge detection worked.