Reduce complexity of legal_to_markdown by reducing redundancies.