Refactoring annotation.js and removing old TODOs/comments