Improved provisioning script