Moving resources to partials

DRYing up some of the view code.