* updated the comment overlay to avoid widget re-rendering when user switches to comment mode * removed duplicate code.