Mods to template PHP