PHP templates cleaning