Generic phase determination with T given beginning to work.  Still need to sort out TS, HT, UT though.

Signed-off-by: Ian bell <ian.h.bell@gmail.com>