Can you move this partials section to a separate method to improve readability of the code?