Added some additional debug
Formatting, a little more verbose logging
Corrected indentation, re-use the static variables we have already defined where appropriate
More debugging