Updated coding style and fixed tpl