ModeltoC updated to fix template var issues