refactored js for comment like incrememnt and ajax post/delete