Implements a proper uninstall confirmation page and adds some code optimisations