some code cleanup and small design adjustments
clean up testfile