Ts 3006 fixes

TS-3006 Fix compile errors and warnings.