Refs #9358.  Added and fixed unit tests.
Refs #9358.  Cleaned up debug output.