Move loading posts into controller from view