add destroy and repair functions, upgrade to latest underlying API