Add documentation for remaining code with JSDoc