CONTRIB-3782: Finalised work for upgrade and reset functionality. All tests now pass!!!