cleanup of doc structure