refactored all comment javascript