Added custom Spark Initialization code