Basic version of TNO migration script copy, without testing or warranty.
Can be used for cherrypicking functionality