Added `logT` function, lots more documentation.