Revise template files for get_metric_data()
Fix get_var functions