Some corrections for age analysis in php, tpl and tests