Used the ViewModel constructor for setting template variables