Restructured TS map computation

As close to final as it could get today.
Add space and the end of each string on each line for this to be printed correctly.