Better debugging output and comments