Various small tweaks -- removed some debug code