Improvements on wizard code