Finished refactoring semi-only tpa