Made output writing from tests conditional on symbol TEST_DUMP

Changed method order so that details is put further down
Simplified type declaration through the use of 'var'
Added Todo comments in advance of further refactoring
Merge pull request #44 from rogernorling/toggle-test-dump

Extracted text dump methods