Added unit tests, fixed generic v2.0 bugs

-Added a unit test suite
-Bug fixes
-Documentation fixes