Extracted code using partials. View is now cleaner