Rework TODO's and add JSDOC comments