Improved HDInsight scripts