Added test cases and almost have the edge detection working completely.