improvements to structure parsing