Debug = more verbose logging, added some more comments.