cleaned code - made initializeWidgetHandles()