TM cleanup