updated to work with dom instantiation and addd example widgets to demonstrate