Markdown format corrections
URL handling code refactored to an object