Cleanups and documentation fixes for some PT code