Update gen_widget.py

Removed some older sample input text and removed some unused code.  Added a couple of comments.