Flatten widgets

Fix issue #80