Misc cleanup, and add some of the initial tsqa tests