Flattenterms