Tidy up, commenting and refactoring

Refs #10092