Added code that is strictly for debugging

I'll have to remove it later - it's proving to be difficult to test
updates without the debug code being commited to the github repo