Better hierarchy representation for documents