Fix jsdoc and more edge case tests.