unit tests, JSDoc, server API update