TS-938 Fixes

Working, includes some changes from Jay though, maybe you just want the commit and not the rest? @georgeye, what do you think?