Sanitize 'filterComments' and improve readability/modularity

I am not sure what you mean. As far as I can tell that's not the same behavior. Maybe the function name is not clear enough?