Improved automation of resetting and setting up initial settings.