Some cleanups of debugging code
Add the testing application