clean up the mess with twig, using partials, blocks, and layouts