code cleanup in payments tpl