Added basic feature to control visibility of widgets.