Refactoring. Added select.
Added input widget.