Improve some documentation, logging, simplify TPS decorator