work on bugs 783499 and 808370: cleanups, polish, preparing for test fixes