Separated out newsfeed code