Restructured TS map computation

As close to final as it could get today.
512, 9472 is much too specific to your application to have as a default here.
Please remove this default.