start dialog in separate thread; use code to layout dialog
remove useless and obsolete files