Text this: Layered structure and reference in a functional perspective