Fixed widget remove/uninstall issue.
Starting code cleanup/QA.