more work for bug 813456. minor rebase for bug 877262. started work on fixing tests for bug 760876