More work on transforming parse trees