Code refactoring. Updated the version of Spark.