BUGFIX: Works for extra content loaded on the feed now.
Also moved lots of stuff into functions.