extra debug, and some clean up