Refactor trp.h to use offsets internally.