code cleanup, more debugging