Refactored templates/layouts.