Clean up document type