Fixed issue with Comment Icons and Refactored the code structure for js file