Split of Parser from Tpl

Decoupled the Parser from the Tpl class to improve speed and for separation of responsibility.