added missing api functions and more unit tests
Merge remote branch 'origin/master'