Lots of contract updates and logic additions