Processing and Producing Head-final Structures