remove test code
add test helper statements
handle mocha async