Abstract some stuff on TEs