More work on conversion to TS.