Bunch of updates

Had a go at this this weekend - updated to latest upstream and tried to fix up some stuff I noticed but unfortunately the upstream update appears not to actually install successfully since they're not pulling in t4 when they need to.