Adding basic template support