Some serious refactoring of the confirmation tool