update terms and fix refs