Refactored templates directory