added api v2 comments and rewrote majority of unit-tests for new api