Improved implementation of the wizard.