[IMP]remove unused code and image dialog in widget