Add fixes from various forks that apply to our work

We should be in pretty good shape overall after this. I just need to add in GT1 and IN2 segments that I've been creating manually and library work should pretty much be wrapped up.