29156 code cleanup

Re issuing this with the branch rebased to reflect current sprint5 state.