Whitespace changes.
Improved debug logging and documentation of code.