Changed the way the view is refreshed