tp.h: test fixed and refactored.