[changed] Rewrote TRE classes.