Cleaned up the model and the view