Added basic edge detection

Hacked in basic edge detection in to the program to complete exercise 6.4.1