Added code for the view and model.