improve the cleaning of the md to export to book files