Lazy eval template variables

Change-Id: I3351cb43082f892ad3cec4e1bdf153b4956517f9