Completed the Template Parser