Added Retry and Cancel Buttons; Added comments to widget controller

Most variables and functions in widget controller have been clarified with comments.