Move some logic to the view object