Ubuntu update to most. Some modifications to the TS_prep-triggered functions