remove debug echo statements and use more phpunit built in facilities where available