factored, fixed, and improved pending comments check