Edited input of noedges to report correct number of edges to be 0.
Rewrote Adam's function to be readable and report correct number of edges
Commented out some code.