Make debug output null by default, but give the ability to output it.

Also add in some new debug logs.
Merge branch 'logging-improvements' into 'master'.

This brings in some nice changes to the logger class
I'm using here, with improvements to debug output
being the biggest thing.