Refactored a bit, DRYed up with partials