Updated the unique key generation for widgets to include a version token that forces a refresh when incremented. Adjusted the restore button logic to increment the token for a full UI redraw.
Refactor widget logic and improve comments for clarity.