Adding shortcode, moving content generation to separate function