Added better debug logging
Removed commented out and/or old debug code