Sanitize 'filterComments' and improve readability/modularity

not sure that it worth introducing such helper function, it's more natural if such small functions will be inlined :)