minor cleanup
adding many debug messages