Cleaned up code associated with markdown previews.