tpl cleanup
Code cleanup