Shortcode displaying at the top of the page [duplicate]

You use the function the_exerpt(), replace this with get_the_excerpt().
I don’t know for sure, but you might need to use apply_filters('the_excerpt', get_the_excerpt()) to maintain the formatting in wich the_excerpt() is returned.

Try to use get_comment_reply_link instead of comments_popup_link.

both functions the_excerpt() and comment_popup_link() won’t return values, but print it, wich cause te content to be displayed at the top op the page.