Added comments to widget initialization code.
Removed unnecessary code.