Twist input, TF publisher and associated helper files

See the different commits to pick and choose what is generally relevant.