Many more refinements to structure analysis