Unpatch for TS stuff

implemented global var isTS for switching on and off TS stuff