Add some comments and more debugging info.