edge is now a parameter for ziggbin
updates to tests and refactoring to R/ directory