Refactor TP to include new emcpose functions