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