Refactored templates to use base and blocks