Upgraded templates to PHP files