Improved script and more dynamic settings.