Update variable access in templates