Refactoring and improvements to commenting

Refs #9968