More cleanup and JSDoc