debug cleanups, working test