updated audit public API, fixes, added test cases

* messed commit!