Final code sign-off

Partner pushed code without merging first, triggering a cascade of
reverts. Had to partially merge from 2f3a5f1 and manually merge
changes to algorithm tests.