markdown - refactor to move markdown methods into model

Mike - this was the refactor requested.