remove global app state from view (from initial code review)