Refactor category, view and toolbar state changes