Reorganized attrs in widget.py