Further re-factoring and stopped assuming pt0 was the origin.