Moved tsshim to better facilitate modularisation.