Refactoring for application level widget switching for improved state display management.