Refactor some JSDoc