Add uninstall task; remove some unused code