Added cleanup and uninstall handling