Refactor markdown