Added changes to get template raw and output the view correctly