Refactored createComment JS
Refactored createDiscussion JS