Added getTP and related functions/structures