Refactored widget expansion to allow only one expanded widget at a time