Added the edgeCutoff function with tests.

Closes #2