Refactoring of the comment module