minor fixes, debug code removed