Refactored the markdown code

I would like to keep the original helper method and not use the model level methods.