Split apart various calls and add intermediate output for debuggin.