Extracted text dump methods 

I suggest this change as a step toward fully automated tests. The text dumping can be disabled with the conditional symbol TEST_DUMP so I can skip it while refactoring while others can view it.