Attempting to handle uninstall correctly. Tidying up