Cleaning of tpl scripts