Tman-code cleanup